2

I have a Couchbase document that I want to mutate multiple properties on in one call. If one of the property values is null, the mutate fails with a message of:

KV Error: {Name="EINVAL", Description="Invalid packet", Attributes="internal,invalid-input"}

and a status of

Couchbase.IO.ResponseStatus.InvalidArguments

If I just try to mutate a single property with null, and if none of the property values are null. The mutate will be successful.

Also if I try to mutate multiple properties to null it will fail.

// This works
var mutatedWorks1 = bucket.MutateIn<dynamic>(doc1.DocId)
    .Upsert("nullProperty", "NotNull")
    .Upsert("name", "MutatedName")
    .Execute();

// This also works
var mutatedWorks2 = bucket.MutateIn<dynamic>(doc1.DocId)
    .Upsert("nullProperty", null)
    .Execute();

// This doesn't work
var mutatedNotWork = bucket.MutateIn<dynamic>(doc1.DocId)
    .Upsert("nullProperty", null)
    .Upsert("name", "MutatedName")
    .Execute();      

// This also doesn't work
var mutatedNotWork = bucket.MutateIn<dynamic>(doc1.DocId)
    .Upsert("nullProperty", null)
    .Upsert("name", null)
    .Execute();   

Couchbase client is .Net SDK 2.7.10

How can I mutate multiple properties if one or more of the property values are null?

1
  • Now getting this issue with SDK v 3.0.6. Looks like they re introduced a bug lol Commented Oct 2, 2020 at 15:58

1 Answer 1

2

This has now been fixed (NCBC-2038) and is scheduled for release in our next maintenance patch which is scheduled for 6th Aug 2019.

Thanks

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.