Incorrect interpretation of the "expiry".

Description

Java SDK has two kinds of functions. The first functions accepts expiry as CommonDurabilityOptions, the second functions as an simple Duration object.
When I call collection.upsert() with UpsertOptions.upsertOptions().expiry(duration) then for the duration less than 30 days the value is interpreted as an offset and in other case as a absolute time stamp.
But when I call collection.touch() or collection.getAndTouch() with an offset more than 30 days Couchbase immediaely deletes the document.

I have a test for the problem and it demonstrates this odd behaviour.

Environment

Couchbase Server Community Edition 6.5.1 build 6299 couchbase-java 3.0.7 couchbase-java-core 2.0.8

Gerrit Reviews

None

Release Notes Description

None

Attachments

2

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created September 24, 2020 at 12:38 PM
Updated September 30, 2020 at 4:16 PM
Resolved September 30, 2020 at 4:16 PM
Instabug