couchbase / sync_gateway

Manages access and synchronization between Couchbase Lite and Couchbase Server
https://www.couchbase.com/products/sync-gateway
Other
447 stars 138 forks source link

CBG-4289 fix import CV value for HLV code #7146

Closed torcolvin closed 3 days ago

torcolvin commented 1 week ago

Created new tests to cover import cases https://docs.google.com/document/d/19mC9-TptN7ynuF5XR9TQ_MckHWsSrjUfI2p71G_DD1U/edit#heading=h.xzdilbaiwy25

The specific bugs initially noticed were around _vv.ver getting updated to newVVEntry.Value = expandMacroCASValueUint64 which was never correct on import. Additional logic was expanded to cover all tests.

For ease of reading this code, the existing tests were ported to a parameterized test first with the buggy logic in place, you can read the commit separately.

Code is also tested with live XDCR.

Also removes ImportCAS as part of CBG-4285.

Pre-review checklist

Integration Tests