Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.0.0
-
Untriaged
-
Unknown
Description
Unable to get or set full document body and xattr in a single operation, when using gocb.
Attempting to set the path to "" for the document body portion of the SUBDOC_MULTI_LOOKUP or SUBDOC_MULTI_MUTATION operation results in an 'invalid arguments' error, which appears to be gocb's translation of statusCode(0x04).
gocb code to for the attempted upsert:
docFragment, err := bucket.Bucket.MutateIn(k, 0, uint32(exp)).
UpsertEx("sync", xv, gocb.SubdocFlagXattr|gocb.SubdocFlagCreatePath).
UpsertEx("", v, gocb.SubdocFlagNone).
Execute()
Based on my review of the gocb code, it's not complaining about the empty path - the request gets sent to the server successfully.
I'm getting the same error (invalid arguments) when trying to do a lookup of doc body and XATTR in a single multi_lookup.
Attachments
Issue Links
For Gerrit Dashboard: MB-23522 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
75862,8 | MB-23522: Add support for setting Result match Loc | master | subjson | Status: MERGED | +2 | +1 |
75863,12 | MB-23522: Add CMD_{GET,SET} to multi-path ops | master | memcached | Status: MERGED | +2 | +1 |
76245,6 | MB-23522: Refactor subdoc command flags for tests | master | memcached | Status: MERGED | +2 | +1 |
76247,6 | MB-23522: Add BinprotSubdocCommand docFlag setter | master | memcached | Status: MERGED | +2 | +1 |
76249,7 | MB-23522: Add doc flags param to subdoc functions | master | memcached | Status: MERGED | +2 | +1 |
76254,11 | MB-23522: Abstract doc flags for mbcp subdoc tests | master | memcached | Status: MERGED | +2 | +1 |
76387,4 | MB-23522: Abstract doc flags in XATTR tests | master | memcached | Status: MERGED | +2 | +1 |
76403,25 | MB-23522: Split subdoc flags to path & doc flags | master | memcached | Status: MERGED | +2 | +1 |
76707,12 | MB-23522: Allow Add semantics for multi mutations | master | memcached | Status: MERGED | +2 | +1 |
76769,4 | MB-23522: Allow doc flag in subdoc encoder | master | memcached | Status: MERGED | +2 | +1 |
77108,4 | MB-23522: Improve subdoc doc_flag documentation | master | memcached | Status: MERGED | +2 | +1 |
78961,3 | [Event Handlers] Handle recursive mutations from CMD_SET in handler code | master | eventing | Status: MERGED | +2 | +1 |