Couchbase Java subdocument mutate expiry

Hi

Not sure if I’m missing something obvious, but consider the following code:

bucket.mutateIn("test").withExpiry(3600).upsertDocument(true).upsert("test", "test").execute();

The document expiry does not get set, regardless if the document exists before or not. If the document already has an expiry it will set it back to 0.

I’ve tried various version of both server and sdk, currently sdk 2.7.0 and 6.0.0 build 1693 server.

If I remove the upsert, and the document happens to exist, the expiry will get set though, it seems to be that using upsertDocument will always clear the expiry.

I’ve done more digging and the sdk is sending the correct flags:

Selection_03109

I guess this would be an issue with couchbase server then?

It looks like it, let’s check it out. I’ve filed MB-32364 on your behalf. You should be able to track it there.

Thanks! The multipath workaround is working for me until the release.

1 Like