It's quite easy to get CBL to build a rev tree for a document which results in SG emitting warnings in the logs for "Found gap in revision list. Expecting gen 6 but got 5 in [...]". This warning actually doesn't only happen on the push, and is continually logged for every missing revision generation every time the affected document is marshalled until SG is able to prune the affected gap away.
This happens on the client side when a document the server knows about is mutated enough times for the revision tree history to be truncated between the last known server rev and the most recent N revs on the client. Currently this setting determines a maxHistory of 20 revisions, but I believe it should be client-side configurable.
Related user reported issue (for the old warning message):
Follow up from
https://couchbasecloud.atlassian.net/browse/CBG-1669
It's quite easy to get CBL to build a rev tree for a document which results in SG emitting warnings in the logs for
"Found gap in revision list. Expecting gen 6 but got 5 in [...]"
. This warning actually doesn't only happen on the push, and is continually logged for every missing revision generation every time the affected document is marshalled until SG is able to prune the affected gap away.This happens on the client side when a document the server knows about is mutated enough times for the revision tree history to be truncated between the last known server rev and the most recent N revs on the client. Currently this setting determines a maxHistory of 20 revisions, but I believe it should be client-side configurable.
Related user reported issue (for the old warning message):
https://forums.couchbase.com/t/sg-warning-wrn-encoderevisions-found-weird-history/23667
Setup
CBL / SG Version: Android EE 2.8.6 / 3.0.0-392
SG Config: Default database config
Repro steps
Start CBL and SG with a continuous bidirectional replication
Create a doc (at rev 1) on the client and have it pushed to SG
Stop the CBL replicator
Mutate the document on the client enough to have a gap larger than 20 (rev 22)
Start the CBL replicator again and let rev 22 be synced
Actual Result:
Observe "Found gap" warning in SG logs
Expected Result:
Don't see a warning for this expected behaviour
Logs :
Step 2
Step 5