sync_gateway
sync_gateway copied to clipboard
CBG-3913 replace parseStreamWithXattr with sg-bucket function
Depends on https://github.com/couchbase/sg-bucket/pull/122 and https://github.com/couchbase/sg-bucket/pull/123
- Consolidate tests into a table driven test, these tests exist in sg-bucket too with just
DecodeValueWithXattrs. - Replace errors with sgbucket errors and use errors.Is
Pre-review checklist
- [x] Removed debug logging (
fmt.Print,log.Print, ...) - [x] Logging sensitive data? Make sure it's tagged (e.g.
base.UD(docID),base.MD(dbName)) - [x] Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in
docs/api
Dependencies (if applicable)
- [x] Link upstream PRs
- [ ] Update Go module dependencies when merged
Integration Tests
- [x]
GSI=true,xattrs=truehttps://jenkins.sgwdev.com/job/SyncGateway-Integration/2406/
I was thinking about changing sgbucket.DecodeValueWithXattrs to return map[string][]byte for xattr values so the caller doesn't have to loop over them again.