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-3797 Attachment handling for HLV push replication #6702

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Conversation

adamcfraser
Copy link
Collaborator

@adamcfraser adamcfraser commented Feb 24, 2024

CBG-3797

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.

Dependencies (if applicable)

  • After CBG-3255 is merged, rebase on beryllium before merging

Integration Tests

Comment on lines +1576 to +1578
func (bh *blipHandler) useHLV() bool {
return bh.activeCBMobileSubprotocol >= CBMobileReplicationV4
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Already got tired of reading the subprotocol check! 👍

Comment on lines 332 to 333
doc, _, err := collection.GetDocWithXattr(ctx, docID, db.DocUnmarshalNoHistory)
require.NoError(t, err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to limit this test to xattr only? Or should we switch this (and other usages) to collection.GetDocument() ?

Suggested change
doc, _, err := collection.GetDocWithXattr(ctx, docID, db.DocUnmarshalNoHistory)
require.NoError(t, err)
doc, err := collection.GetDocument(ctx, docID, db.DocUnmarshalNoHistory)
require.NoError(t, err)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. GetDocument is a reasonable change for these tests. For the next milestone we might want to disable VersionVectorSubtest inside BlipTestClientRunner if xattrs=false (as that's not a supported config when we start writing the HLV to its own xattr), but we don't need that yet.

bbrks
bbrks previously approved these changes Mar 11, 2024
Copy link
Member

@bbrks bbrks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending rebase

Base automatically changed from CBG-3255-squash to beryllium March 11, 2024 12:41
@bbrks bbrks dismissed their stale review March 11, 2024 12:41

The base branch was changed.

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.
@adamcfraser
Copy link
Collaborator Author

Rebased on beryllium.

@bbrks bbrks merged commit bd2ca37 into beryllium Mar 13, 2024
17 checks passed
@bbrks bbrks deleted the CBG-3797 branch March 13, 2024 13:40
bbrks pushed a commit that referenced this pull request Apr 9, 2024
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>
bbrks pushed a commit that referenced this pull request Apr 16, 2024
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>
bbrks pushed a commit that referenced this pull request Apr 16, 2024
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>
adamcfraser added a commit that referenced this pull request May 7, 2024
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>
adamcfraser added a commit that referenced this pull request May 10, 2024
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>
adamcfraser added a commit that referenced this pull request May 14, 2024
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>
torcolvin pushed a commit that referenced this pull request May 21, 2024
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>
adamcfraser added a commit that referenced this pull request May 27, 2024
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>
adamcfraser added a commit that referenced this pull request Aug 11, 2024
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>
adamcfraser added a commit that referenced this pull request Aug 11, 2024
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>
adamcfraser added a commit that referenced this pull request Aug 13, 2024
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>
adamcfraser added a commit that referenced this pull request Nov 29, 2024
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>
bbrks pushed a commit that referenced this pull request Dec 2, 2024
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>
bbrks pushed a commit that referenced this pull request Dec 5, 2024
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>
bbrks pushed a commit that referenced this pull request Dec 17, 2024
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>
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