-
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-3797 Attachment handling for HLV push replication #6702
Conversation
func (bh *blipHandler) useHLV() bool { | ||
return bh.activeCBMobileSubprotocol >= CBMobileReplicationV4 | ||
} |
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.
Thanks! Already got tired of reading the subprotocol check! 👍
rest/blip_api_attachment_test.go
Outdated
doc, _, err := collection.GetDocWithXattr(ctx, docID, db.DocUnmarshalNoHistory) | ||
require.NoError(t, err) |
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.
Do we need to limit this test to xattr only? Or should we switch this (and other usages) to collection.GetDocument()
?
doc, _, err := collection.GetDocWithXattr(ctx, docID, db.DocUnmarshalNoHistory) | |
require.NoError(t, err) | |
doc, err := collection.GetDocument(ctx, docID, db.DocUnmarshalNoHistory) | |
require.NoError(t, err) |
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.
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.
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.
LGTM pending rebase
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.
Rebased on beryllium. |
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
Integration Tests
GSI=true,xattrs=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/2320/