Skip to content

Warning message while using Expiry with @Document annotation #1204

Closed
@balaji-it

Description

@balaji-it

Customer is asking for a solution to avoid the below warning message.

2021-08-25 22:04:10 [cb-events] WARN  com.couchbase.request.warn - [com.couchbase.request][SuspiciousExpiryDurationEvent] The specified expiry duration PT457078H4M10S is longer than 50 years. For bug-compatibility with previous versions of SDK 3.0.x, the number of seconds in the duration will be interpreted as the epoch second when the document should expire (2022-02-21T22:04:10Z). Stuffing an epoch second into a Duration is deprecated and will no longer work in SDK 3.1.
java.lang.Throwable: Deprecated expiry duration usage (not a failure, just informative)

Spring-Data: 4.2.4
Java SDK: 3.1.6

Is there a way to use @document annotation with an Instant instead of a Duration like we currently have to avoid this warning?
Currently using: @document(expiryUnit = TimeUnit.DAYS, expiry = 180)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions