Description
Databases DB-A, DB-C, both of which contain a document D-1.
In DB-A, D-1 is exactly { K1 -> V1 }.
In DB-C, D-1 is, exactly { K2 -> V2 }.
Run a pull replication to DB-A from DB-C with a custom resolver that prefers the remote
document.
When the replication is complete, DB-A contains exactly one document, D-1, which
is, exactly { K2 -> V2 }, the remote version.
resolve conflict, local: Document{@0x2bfc1e5doc1@2-a3d06430f86d40dadfab80468163e114bc4d4d45(..):Ann Arbor=>Harpst}, remote: Document{@0x4d784badoc1@2-e22d4fe1615917b80c3b60b96d0d0c936c1f9b6f(..):Oberlin=>Woodland}, resolved: Document{@0x4d784badoc1@2-e22d4fe1615917b80c3b60b96d0d0c936c1f9b6f(..):Oberlin=>Woodland}
|
native resolve conflict, winner: 2-e22d4fe1615917b80c3b60b96d0d0c936c1f9b6f, loser: 2-a3d06430f86d40dadfab80468163e114bc4d4d45, flags: 0x022, body: null
|
Re-run the test, with a custom resolver that adds a document D-4 (exactly { K4 -> V4} )
to DB-A, and then prefers the remote document
When the replication is complete, DB-A contains exactly two documents, D-4
(exactly { K4 -> V4} ) and D-1 exactly { K1 -> V1 }, the local version.
resolve conflict, local: Document{@0x2bfc1e5doc1@2-a3d06430f86d40dadfab80468163e114bc4d4d45(..):Ann Arbor=>Harpst}, remote: Document{@0x4d784badoc1@2-e22d4fe1615917b80c3b60b96d0d0c936c1f9b6f(..):Oberlin=>Woodland}, resolved: Document{@0x4d784badoc1@2-e22d4fe1615917b80c3b60b96d0d0c936c1f9b6f(..):Oberlin=>Woodland}
|
native resolve conflict, winner: 2-e22d4fe1615917b80c3b60b96d0d0c936c1f9b6f, loser: 2-a3d06430f86d40dadfab80468163e114bc4d4d45, flags: 0x022, body: null
|
This is because the call to c4doc_resolveConflict fails with the message:
Assertion failed: docID && revID && sequence > _lastSequence (/Users/blakemeike/Working/java/hydrogen/core/LiteCore/Database/SequenceTracker.cc:112, in documentChanged)/data/app/com.couchbase.lite.test-4A5WaDH9gKjtjumohhr97g==/lib/arm/libLiteCoreJNI.so litecore::error::assertionFailed(char const*, char const*, unsigned int, char const*, char const*)/data/app/com.couchbase.lite.test-4A5WaDH9gKjtjumohhr97g==/lib/arm/libLiteCoreJNI.so litecore::SequenceTracker::documentChanged(fleece::alloc_slice const&, fleece::alloc_slice const&, unsigned long long, unsigned long long)??? ??? /data/app/com.couchbase.lite.test-4A5WaDH9gKjtjumohhr97g==/lib/arm/libLiteCoreJNI.so c4Internal::Database::documentSaved(c4Internal::Document*)/data/app/com.couchbase.lite.test-4A5WaDH9gKjtjumohhr97g==/lib/arm/libLiteCoreJNI.so c4Internal::TreeDocument::resolveConflict(FLSlice, FLSlice, FLSlice, unsigned char, bool)??? ??? /data/app/com.couchbase.lite.test-4A5WaDH9gKjtjumohhr97g==/lib/arm/libLiteCoreJNI.so fleece::function_ref<bool ()>::operator()() const/data/app/com.couchbase.lite.test-4A5WaDH9gKjtjumohhr97g==/lib/arm/libLiteCoreJNI.so bool c4Internal::tryCatch<bool>(C4Error*, fleece::function_ref<bool ()>)/data/app/com.couchbase.lite.test-4A5WaDH9gKjtjumohhr97g==/lib/arm/libLiteCoreJNI.so c4doc_resolveConflict/data/app/com.couchbase.lite.test-4A5WaDH9gKjtjumohhr97g==/lib/arm/libLiteCoreJNI.so Java_com_couchbase_lite_internal_core_C4Document_resolveConflict??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
|
This is a fairly recent regression.
Attachments
Issue Links
- duplicates
-
CBL-1174 Assertion failure (winning sequence > last sequence)
- Closed