Upsert fails after attempting to insert an empty key

Hi There,

My automated investigation tests are failing a bit oddly. Looks like this:

IOperationResult upsert1 = bucket.Upsert(“Key”, “Value”);
Assert.IsTrue(upsert1.Success);
IOperationResult insert = bucket.Insert(string.Empty, “value”);
Assert.IsFalse(insert.Success);
IOperationResult upsert2 = bucket.Upsert(“Key”, “Value”);
Assert.IsTrue(upsert2.Success);

The first upsert works fine and the insert with an empty string fails as expected with a message of Invalid Arguments. Oddly though the second upsert fails with no message or exception.

Currently using:

  • Client v2.1.4
  • Server v3.0.2-1603 Enterprise Edition (build-1603)

Anyone got any thoughts on why this would be?

It’s not a massive issue as I have a wrapper library that stops people using an empty key but it does look a bit odd

If you take out the second failed insert command, does the second upsert still fail? I’m just wondering if it’s a symptom of the keyless insert, or a symptom of doing two upserts one after the other on the same key. I suspect it’s the former, but want to be certain.

Brant

@nick_adcock -

I tried to replicate, but I couldn’t on master or on 2.1.4 tag.

How do you know it’s failing? Is Success == false? Can perhaps enable logging and just capture bootstrapping and that failing test?

-Jeff