-
Notifications
You must be signed in to change notification settings - Fork 138
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-3254: CBL pull replication for v4 protocol #6640
Conversation
docRev, err = handleChangesResponseCollection.GetRev(bsc.loggingCtx, docID, rev, true, nil) | ||
} else { | ||
// extract cv string rev representation | ||
version, vrsErr := CreateVersionFromString(rev) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CreateVersionFromString is a relatively expensive operation (base64 decoding and hex cas conversion). It's particularly true here, since these are coming from changeArray (which we just constructed when we sent a batch of changes).
More broadly, I feel like we should discuss whether we can have the majority of our code work with the formatted (base64 and string cas) in memory, to avoid constant conversion back and forth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made some changes (now to store on docRev the history in string format etc). I haven't yet removed this CreateVersionFromString() here. After the update to the storage format discussed on MB-60281 I started to change the way we represent the HLV in memory but stopped as it will grow this PR by a lot. I propose filing ticket and getting into next sprint to refactor to support the updated storage format and only convert to unit64 etc when doing conflict checks.
5dc1423
to
3f87ae8
Compare
bebb6fb
to
ea6dc3a
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
…nts. (#6614) * - Rename `SourceAndVersion` to just `Version`, and rename `SourceAndVersion.Version` to `Value`. - Add/Improve comments. * Update db/hybrid_logical_vector.go
…. Also added temporary methods to use db operation in btcRunner test to put and update docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, two minor tweaks requested
db/hybrid_logical_vector.go
Outdated
} | ||
if len(pairList) > 0 { | ||
separatorNeeded = true | ||
s.WriteString(strings.Join(pairList, ",")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strings.Join is an efficient way to iterate over a set and do WriteString of separator and elements, but in this case we're already iterating over the set, and already have our own strings.Builder. Why not just add elements to s as we iterate over MergeVersions and PreviousVersions, instead of iterating twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree in hindsight this makes more sense. I originally went for this approach to avoid adding a trailing ',' at the end of the string as this would break the design CBL expect. I have got round that now with a item counter so we can keep track of the elements in the map we are iterating over.
* 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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-3254
Breakdown of changes:
Inside sendRevision, I firstly changed revid -> rev given this can be a string of a revid or current version. Added code to fetch the doc by CV if running in v4 replication and above. Also added function toHistoryForHLV which will take a full HLV and convert it to the CBL string format needed for the replicator. The result of this is passed into blipRevMessageProperties as it was before.
Pre-review checklist
fmt.Print
,log.Print
, ...)base.UD(docID)
,base.MD(dbName)
)docs/api
Dependencies (if applicable)
Integration Tests
GSI=true,xattrs=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/2269/