-
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-3764 create multi-xattr subdoc APIs #6739
Conversation
- implement remaining multi-xattr cases - test fixes
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.
A few minor comments/questions but otherwise looks good to me.
db/database.go
Outdated
xattrKeys := []string{base.SyncXattrName} | ||
if db.userXattrKey() != "" { | ||
xattrKeys = append(xattrKeys, db.userXattrKey()) | ||
} |
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.
A helper function to build the xattr keys wouldn't be a bad idea, since we're going to need to enhance it to add _vv in the near future.
LGTM - ready to merge once dependencies are merged and go.mod updated. |
Co-authored-by: adamcfraser <[email protected]>
Update multi xattr subdoc APIs to support multiple xattrs. Where the APIs previously accepted two xattrs (user xattr and sync xattr), continue to allow two xattrs with CBS 7.6 with a CAS check in a loop. If the API previously did not accept two APIs, Couchbase Server 7.2 will return an invalid argument error if multiple xattrs are not specified.
Possible enhancements:
BucketStoreFeatureMultiXattrSubdocOperations
to be able to test without running two versions of couchbase serverxattrKeys
are never empty string. This was a late fix in integration tests from a somewhat opaque gocb error message. Alternatively, error in rosmar if anyxattrKeys
are empty.ErrXattrNotFound
andErrXattrPartialFound
to sg-bucket and return in rosmar?Things to look for in the PR:
couchbaselabs/rosmar#25
couchbase/sg-bucket#112
Pre-review checklist
fmt.Print
,log.Print
, ...)base.UD(docID)
,base.MD(dbName)
)docs/api
Dependencies (if applicable)
Integration Tests
GSI=true,xattrs=true,CBS-7.2.2
https://jenkins.sgwdev.com/job/SyncGateway-Integration/2366/GSI=true,xattrs=true,CBS-7.6.1-3122
https://jenkins.sgwdev.com/job/SyncGateway-Integration/2364/