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
Java SDK has two kinds of functions. The first functions accepts expiry as
CommonDurabilityOptions
, the second functions as an simpleDuration
object.When I call
collection.upsert()
withUpsertOptions.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()
orcollection.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.