-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CBG-3736: cv only delta sync #6661
Open
gregns1
wants to merge
35
commits into
release/anemone
Choose a base branch
from
CBG-3736
base: release/anemone
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gregns1
force-pushed
the
CBG-3736
branch
2 times, most recently
from
March 13, 2024 17:09
c996631
to
5a7962a
Compare
bbrks
force-pushed
the
release/anemone
branch
2 times, most recently
from
April 16, 2024 14:46
555a093
to
a25664c
Compare
adamcfraser
force-pushed
the
release/anemone
branch
2 times, most recently
from
May 10, 2024 18:01
f0850fd
to
6ae5004
Compare
* CBG-3209: changes for retreival of a doc from the rev cache via CV with backwards compatability in mind * fix failing test, add commnets * fix lint * updated to address comments * rebase chnages needed * updated to tests that call Get on revision cache * updates based of new direction with PR + addressing comments * updated to fix panic * updated to fix another panic * address comments * updates based off commnets * remove commnented out line * updates to skip test relying on import and update PutExistingRev doc update type to update HLV * updates to remove code adding rev id to value inside addToRevMapPostLoad. Added code to assign this inside value.store * remove redundent code
* CBG-3210: Updating HLV on Put And PutExistingRev (#6366) * CBG-3209: Add cv index and retrieval for revision cache (#6491) * CBG-3209: changes for retreival of a doc from the rev cache via CV with backwards compatability in mind * fix failing test, add commnets * fix lint * updated to address comments * rebase chnages needed * updated to tests that call Get on revision cache * updates based of new direction with PR + addressing comments * updated to fix panic * updated to fix another panic * address comments * updates based off commnets * remove commnented out line * updates to skip test relying on import and update PutExistingRev doc update type to update HLV * updates to remove code adding rev id to value inside addToRevMapPostLoad. Added code to assign this inside value.store * remove redundent code * Add support for PutExistingCurrentVersion * updated to remove function not used anymore * remove duplicated code from dev time * fix linter errors + add assertions on body of doc update * address commnets * updates to add further test cases for AddNewerVersions function + fix some incorrect logic * updates to chnage helper function for creation of doc for tests. Also adress further comments * lint error * address comments, add new merge function for merge versions when hlv is in conflict. * updates to remove test case and test * remove unused function * rebase * missed current version name change * more missing updates to name changes
* CBG-3255: Add current version to log entry for population on the channel cache. Pre-requisite for my work on adding CV to change entries. Only adds CV to log entry from docs seen over DCP at this time pending work on channel cache backfill * add comments and protect against panic in channel cache population * add more commnets * updated to move test and few lines populating log entry
#6590) * CBG-3607: disable the ability to set shared_bucket_access to false. In future we will probably look to fully remove the config param but for now this will protect against panics * remove comment slashes + add test comments * updates off review + failing test in integration test run * missed test update * lint error fix * add skip for lint?
* CBG-3356: add CV to change entry, test that it corretcly populates when calling for changes. Tests need to activate a channel cache as backfill for channel cache not yet implemented * updates to fix failing tests. Added cv to version type returned by Putting a doc and deleting a doc to make testing easier * minor changes * updates after rebase * fix for test failure * updates from rebase * updated comment * changes in response to commmets * updates to fix test failures * rebase + lint skip * updates to update the doc id changes test I have to actually test the codepath
…nts. (#6614) * - Rename `SourceAndVersion` to just `Version`, and rename `SourceAndVersion.Version` to `Value`. - Add/Improve comments. * Update db/hybrid_logical_vector.go
* CBG-3212: add api to fetch a document by its CV value * test fix * rebased SourceAndVersion -> Version rename * Update currentRevChannels on CV revcache load and doc.updateChannels * fix spelling * Remove currentRevChannels * Move common GetRev/GetCV work into documentRevisionForRequest function * Pass revision.RevID into authorizeUserForChannels * Update db/crud.go Co-authored-by: Tor Colvin <tor.colvin@couchbase.com> --------- Co-authored-by: Ben Brooks <ben.brooks@couchbase.com> Co-authored-by: Tor Colvin <tor.colvin@couchbase.com>
* `teh` -> `the` * Remove typo'd TODO by implementing assertion * `comapre` -> `compare` * `exsiting` -> `existing`
* CBG-3210: Updating HLV on Put And PutExistingRev (#6366) * CBG-3209: Add cv index and retrieval for revision cache (#6491) * CBG-3209: changes for retreival of a doc from the rev cache via CV with backwards compatability in mind * fix failing test, add commnets * fix lint * updated to address comments * rebase chnages needed * updated to tests that call Get on revision cache * updates based of new direction with PR + addressing comments * updated to fix panic * updated to fix another panic * address comments * updates based off commnets * remove commnented out line * updates to skip test relying on import and update PutExistingRev doc update type to update HLV * updates to remove code adding rev id to value inside addToRevMapPostLoad. Added code to assign this inside value.store * remove redundent code * CBG-3503 Update HLV on import (#6572) * Beryllium: Rename `SourceAndVersion` to `Version` / Improve HLV comments. (#6614) * - Rename `SourceAndVersion` to just `Version`, and rename `SourceAndVersion.Version` to `Value`. - Add/Improve comments. * Update db/hybrid_logical_vector.go * CBG-3254: pull replication for v4 protocol * updates to the btcRunner * tidy of comments * fix linter * updates to change way hlv is represented on doc revision in rev cache. Also added temporary methods to use db operation in btcRunner test to put and update docs * updates to fix linters and remove unused function * more lint stuff * address commnets after rebase * updates to fix failing test and comments * updates to address comments --------- Co-authored-by: Adam Fraser <adam.fraser@couchbase.com> Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
* CBG-3213 Version support for channel removals Adds cv (source and version) to removals in _sync.channels (ChannelMap). Uses RevAndVersion to support query (the same approached used for _sync.rev). Required moving RevAndVersion to channels package for usage within ChannelMap. Changes in crud.go required to support the case where the removal version needs to be set via macro expansion. * Use standard function to update testBackingStore document channels
…6655) * CBG-3719: change in memory format of hlv to match XDCR/CBL format * updates after rebase * updates to fix missed type swap in channels package * update to add encoded bucket UUID to db contect, this allows us to avoid overhead associated with encoding bucketUUID each time a HLV is updated * updates after rebase * updates based off review
* CBG-3788 Support HLV operations in BlipTesterClient Switches the BlipTesterCollectionClient to maintain client HLV and (linear) revtree per document. Switches the docs struct to a map of a new BlipTesterDoc struct, instead of a map of revs per document. BlipTesterDoc still maintains a history of all rev messages received (revMessageHistory) to support test evaluation of received messages, but also defines a linear revTreeId history or an HLV (depending on protocol enabled for the test). Includes a refactor of revID to revTreeID in RevAndVersion, as a step toward standardizing ‘revID’ as the generic property used during replication (which can be currentRev or cv), and revTreeID as a traditional revtree revision ID. * Fixes based on PR review
* CBG-3255 Push replication support for HLV Adds push replication support for HLV clients. Delta sync and attachments are not yet supported (pending CBG-3736, CBG-3797). On proposeChanges, checks whether the incoming CV and parent version represent a new document, known version, valid update, or conflict. Uses the same handling as revTreeID (conflict if parent version isn’t the server’s current version), with the additional non-conflict case where the incoming CV and server CV share the same source and the incoming CV is a newer version. For the incoming rev, detects conflict based on the incoming cv (based on the implicit hierarchy in an HLV, where cv > pv > mv). Includes some test helpers to support writing tests with simplified versions (e.g. 1@abc) while still asserting for encoded source and version. * Test fixes * Fixes/cleanup based on PR review --------- Co-authored-by: Gregory Newman-Smith <gregory.newmansmith@couchbase.com>
HLV clients don't consider revpos, and evaluate whether they need to request an attachment based on the existing set of attachments on the document. SGW still needs to persist revpos into _attachments to support revtree clients. For new attachments added by HLV client, revpos is set to the generation of SGW's computed revTreeID for the incoming revision. Co-authored-by: Gregory Newman-Smith <gregory.newmansmith@couchbase.com>
- Add new parameter to updateAndReturnDoc call from PutExistingCurrentVersion - Add nil check in rev handling in unmarshal JSON
adamcfraser
force-pushed
the
release/anemone
branch
from
May 14, 2024 20:37
6ae5004
to
99bdd0d
Compare
torcolvin
force-pushed
the
release/anemone
branch
from
May 21, 2024 15:22
3e502a3
to
72b0624
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CBG-3736
Pre-review checklist
fmt.Print
,log.Print
, ...)base.UD(docID)
,base.MD(dbName)
)docs/api
Integration Tests
GSI=true,xattrs=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/2397/