Corrupt Revision Data error when saving documents

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

1

Activity

Show:

CB robot December 8, 2023 at 12:57 AM

Build couchbase-lite-c-3.2.0-29 contains couchbase-lite-core commit 33da83e with commit message:
: Corrupt Revision Data error when saving documents (#1828)

CB robot August 17, 2023 at 4:15 PM

Build couchbase-lite-ios-3.2.0-37 contains couchbase-lite-core commit 33da83e with commit message:
: Corrupt Revision Data error when saving documents (#1828)

CB robot July 17, 2023 at 8:04 PM

Build couchbase-lite-log-3.2.0-9 contains couchbase-lite-core commit 33da83e with commit message:
: Corrupt Revision Data error when saving documents (#1828)

CB robot July 17, 2023 at 5:25 PM

Build couchbase-lite-cblite-3.2.0-9 contains couchbase-lite-core commit 33da83e with commit message:
: Corrupt Revision Data error when saving documents (#1828)

CB robot July 3, 2023 at 8:29 PM

Build couchbase-lite-core-3.2.0-65 contains couchbase-lite-core commit 33da83e with commit message:
: Corrupt Revision Data error when saving documents (#1828)

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created October 28, 2022 at 4:13 PM
Updated September 25, 2024 at 9:13 AM
Resolved March 18, 2024 at 4:42 PM
Instabug