Skip to content
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

Merged
merged 14 commits into from
Jan 24, 2024
Merged

Conversation

gregns1
Copy link
Contributor

@gregns1 gregns1 commented Jan 12, 2024

CBG-3254

Breakdown of changes:

  • Changes to sendChanges: if in v4 protocol replication we populate the rev field on changes row with the current version off the change entry. For all other protocol versions we leave it as is.
  • handleChangesResponse: added code to temporarily send full revision for v4 replication
    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.
  • I needed to change the documentRevision struct returned by the rev cache. Before we just had CV on this struct but given we need the full HLV to send in a blip message inside sendRevision I have removed CV added a string representation of history to the stuct.
  • I also enabled the versionVector sub test on the btcRunner. In doing this we needed a way to assert on the current version as well as the revid on the DocVersion struct created by Tor. So I have had to add temp functions to perform operations directly on the db (not through rest api) so it can be assigned to this struct. In doing this, inside GetVersion which is used to assert on in the blip tests I have added a lookup by CV
  • I have added a test assertion function to assert on blip history entitled AssertOnBlipHistory which has to check what version the protocol is in as its very possible a lot of the time the history section of the blip message in our current test suite is empty given we are updating docs on the same source.
  • Added a test entitled TestHLVMapToCBLString that test the format of the conversion of the HLV maps to CBL string format. For the test case that has both PV and MV defined I have had to split the resulting string and assert on substring as the resulting string can have Merge versions in a random order given iteration through a map is random.
  • Added a test entitled TestPullReplicationUpdateOnOtherHLVAwarePeer which purpose is to see if blip history property is correctly populated in HLV aware replication. It makes use of Adams HLV agent to simulate a write from a different peer. In using this I had to move the HLV agent code into a different file as it was inaccessible in its old location
  • I also refactored some of the btcRunner code from a conversion with Ben. We need the ability to skip sub tests in the btcRunner object. For example, the test I added TestPullReplicationUpdateOnOtherHLVAwarePeer needs to be HLV only replication. I have done this by passing in a map of the sub test you want to skip, this is getting used to skip attachment test and delta sync tests for CBL replication too (given we haven't yet implemented that). This allows us the freedom to add further sub tests to the runner in future (can imagine a world we may want a separate sub test for delta sync?)

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Dependencies (if applicable)

  • Link upstream PRs
  • Update Go module dependencies when merged

Integration Tests

@gregns1 gregns1 assigned gregns1 and unassigned gregns1 Jan 12, 2024
@gregns1 gregns1 requested a review from bbrks January 12, 2024 16:33
db/blip.go Outdated Show resolved Hide resolved
db/crud.go Outdated Show resolved Hide resolved
rest/doc_api.go Outdated Show resolved Hide resolved
db/blip_sync_context.go Outdated Show resolved Hide resolved
docRev, err = handleChangesResponseCollection.GetRev(bsc.loggingCtx, docID, rev, true, nil)
} else {
// extract cv string rev representation
version, vrsErr := CreateVersionFromString(rev)
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

db/blip_sync_context.go Outdated Show resolved Hide resolved
@gregns1 gregns1 assigned gregns1, bbrks and adamcfraser and unassigned gregns1 Jan 16, 2024
bbrks
bbrks previously requested changes Jan 18, 2024
db/active_replicator.go Outdated Show resolved Hide resolved
db/blip_handler.go Show resolved Hide resolved
db/hybrid_logical_vector.go Outdated Show resolved Hide resolved
rest/blip_client_test.go Outdated Show resolved Hide resolved
@bbrks bbrks assigned gregns1 and unassigned bbrks and adamcfraser Jan 18, 2024
@bbrks bbrks force-pushed the CBG-3254 branch 2 times, most recently from 5dc1423 to 3f87ae8 Compare January 19, 2024 16:22
@gregns1 gregns1 force-pushed the CBG-3254 branch 2 times, most recently from bebb6fb to ea6dc3a Compare January 22, 2024 14:11
@gregns1 gregns1 assigned bbrks and unassigned gregns1 Jan 22, 2024
gregns1 and others added 10 commits January 23, 2024 11:43
* 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
Copy link
Collaborator

@adamcfraser adamcfraser left a 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/active_replicator.go Outdated Show resolved Hide resolved
}
if len(pairList) > 0 {
separatorNeeded = true
s.WriteString(strings.Join(pairList, ","))
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@adamcfraser adamcfraser assigned gregns1 and unassigned adamcfraser Jan 24, 2024
@gregns1 gregns1 assigned adamcfraser and unassigned gregns1 Jan 24, 2024
@adamcfraser adamcfraser dismissed bbrks’s stale review January 24, 2024 21:17

Transfered review ownership

@adamcfraser adamcfraser merged commit d86ba4f into beryllium Jan 24, 2024
17 checks passed
@adamcfraser adamcfraser deleted the CBG-3254 branch January 24, 2024 21:18
bbrks added a commit that referenced this pull request Apr 9, 2024
* 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>
bbrks added a commit that referenced this pull request Apr 16, 2024
* 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>
bbrks added a commit that referenced this pull request Apr 16, 2024
* 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>
adamcfraser added a commit that referenced this pull request May 7, 2024
* 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>
adamcfraser added a commit that referenced this pull request May 10, 2024
* 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>
adamcfraser added a commit that referenced this pull request May 14, 2024
* 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>
torcolvin pushed a commit that referenced this pull request May 21, 2024
* 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>
adamcfraser added a commit that referenced this pull request May 27, 2024
* 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>
adamcfraser added a commit that referenced this pull request Aug 11, 2024
* 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>
adamcfraser added a commit that referenced this pull request Aug 11, 2024
* 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>
adamcfraser added a commit that referenced this pull request Aug 13, 2024
* 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>
adamcfraser added a commit that referenced this pull request Nov 29, 2024
* 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>
bbrks added a commit that referenced this pull request Dec 2, 2024
* 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>
bbrks added a commit that referenced this pull request Dec 5, 2024
* 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>
bbrks added a commit that referenced this pull request Dec 17, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants