What does the error "same key was specified more than once" mean?


#1

I’m getting this in get_multi and upsert_multi. Full error is

<RC=0x22[The same key was specified more than once in the command list], Key list is empty, C Source=(src/oputil.c,189)>

I’m using Dictionary variant for upsert_multi and using array for get_multi. In both case we made sure no duplicated keys were in the same request. Also, when the list is empty we avoid unnecessary hop and skip upsert_multi to Couchbase altogether.

Do I understand the error message correctly?


#2

What type of object are you passing into the SDK. It requires that __len__ be defined and return a value greater than 0.

https://github.com/couchbase/couchbase-python-client/blob/master/src/oputil.c#L188 is where the error occurs.

The “duplicate command” is a bug, and something I should fix.