You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that in the buildUpsertOptions and buildInsertOptions methods, the doc.getExpiration() value is always converted to seconds using Duration.ofSeconds().
else if (doc.getExpiration() != 0) {
options.expiry(Duration.ofSeconds(doc.getExpiration()));
}
While options.expiry() can accept both Duration and Instant, converting the expiration exclusively to seconds can lead to limitations, especially for setting expirations greater than 50 years. This is because Couchbase supports durations up to 50 years when expressed as seconds, but longer durations must be provided as an Instant.
Does this approach align with the intended design of the buildUpsertOptions and buildInsertOptions methods, or are there other considerations that necessitate the current implementation?
Looking forward to your feedback and insights!
The text was updated successfully, but these errors were encountered:
I noticed that in the buildUpsertOptions and
buildInsertOptions methods, the doc.getExpiration() value is always converted to seconds using Duration.ofSeconds().
While options.expiry() can accept both Duration and Instant, converting the expiration exclusively to seconds can lead to limitations, especially for setting expirations greater than 50 years. This is because Couchbase supports durations up to 50 years when expressed as seconds, but longer durations must be provided as an Instant.
Suggestion
Does this approach align with the intended design of the buildUpsertOptions and buildInsertOptions methods, or are there other considerations that necessitate the current implementation?
Looking forward to your feedback and insights!
The text was updated successfully, but these errors were encountered: