Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-3836

Corrupt Revision Data error when saving documents

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Beryllium
    • 3.0.2
    • LiteCore
    • Security Level: Public
    • None
    • LiteCore 105, LiteCore 108, LiteCore 109
    • 4

    Description

      Reported in the forum https://forums.couchbase.com/t/corrupt-revision-data-error-when-saving-documents/34741/1.

      SDK: Couchbase Lite C
      Version: 3.0.2
      OS: iOS & Android
      Error: kCBLErrorCorruptRevisionData

      This error has only been observed through error reports from user devices, and I have not been able to replicate it.

      It seems that saving a document can sometimes corrupt it, since after the first time this error has been returned when saving a document, subsequent attempts to save the document always fail with the same error. The document can still be purged, though.

      There are also crashes in CBLDatabase_SaveDocumentWithConcurrencyControl and CBLDocument::properties that seem related. It would make sense to me that once a document has been corrupted, invariants that certain code relies on don’t hold anymore.

      The error message only contains the error code. Looking at the source code, only in a few places is a corruptRevisionData error thrown without a message. Additional logging or an error message describing the problem might be the first step to diagnose the issue.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jianmin.zhao Jianmin Zhao
              pasin Pasin Suriyentrakorn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty