Details
Description
Similar to https://issues.couchbase.com/browse/NCBC-2640, but for Go SDK.
When executing a mutation and trying to set `nil` as value, EINVAL is returned.
Example code that I'm using:
```
documentId := "hello1234"
// First we insert some stuff, then we try to alter it
_, errInsert := testDb.Collection.Insert(documentId, map[string]interface{}
, nil)
require.NoError(t, errInsert)
_, errMutate := testDb.Collection.MutateIn(documentId, []gocb.MutateInSpec
{ gocb.UpsertSpec("name", nil, &gocb.UpsertSpecOptions\{CreatePath: true}),
}, nil)
// --> This throws the error <---
require.NoError(t, errMutate)
```
Returned error:
invalid argument | {"status_code":4,"bucket":"bucket_test","scope":"_default","collection":"_default","error_name":"EINVAL","error_description":"Invalid packet","opaque":18,"last_dispatched_to":"192.168.1.109:11210","last_dispatched_from":"192.168.1.105:65378","last_connection_id":"2b9e1bcb4d45f655/7b20324a779687d1"}
Attachments
For Gerrit Dashboard: GOCBC-994 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
137252,1 | GOCBC-994: Coerce mutatein nil values to json null value | master | gocbcore | Status: ABANDONED | 0 | 0 |
137315,3 | GOCBC-994: Convert subdoc nil values to json null | master | gocb | Status: MERGED | +2 | +1 |