-
Notifications
You must be signed in to change notification settings - Fork 192
Expiry of document not working at all? [DATACOUCH-630] #941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
David Prevost commented Maybe already fix with DATACOUCH-622 |
David Prevost commented Or maybe more by https://jira.spring.io/browse/DATACOUCH-605 |
David Prevost commented Mmm finally, it seem to be more DATACOUCH-608 |
Michael Reiche commented -fixed in datacouch-623- |
David Prevost commented Michael Reiche datacouch-623 is about CAS which is not the same thing as expiry.... |
Michael Reiche commented datacouch-608 or 616.
In src/main/java/org/springframework/data/couchbase/core/ReactiveInsertByIdOperationSupport.java:
} else if (durabilityLevel != DurabilityLevel.NONE) { options.durability(durabilityLevel); }
|
Michael Reiche commented The example given shows an entity created from scratch without a CAS. It will not demonstrate the issue described below. repository.save() uses either UpsertById() or ReplaceById(). if (hasNonZeroVersionProperty(entity, operations.getConverter())) {
return (Mono<S>) operations.replaceById(entityInformation.getJavaType()).one(entity);
} else {
return (Mono<S>) operations.upsertById(entityInformation.getJavaType()).one(entity);
} ReplaceById() is missing the handling of expiry |
David Prevost opened DATACOUCH-630 and commented
While trying to test if the expiry of my document was set correctly, I find out that it is not set at all.
Basically, I did a IT that create, and update my entity having
@Document
(expiry = 60) and then I use the couchbase api to validate the expiry and it is never set.The output of my test below show that the expiry date is alway 1970-01-01 unless I use the getAndTouch API of couchbase
Also, if we analyze occurences of CouchbaseDocument#getExpiration then it does not seems to be use anywhere with the couchbase api. And if we check CouchbaseDocument#export, the expiry is not in the content (not sure if it can actually be part of the content....)
Affects: 4.0.4 (Neumann SR4)
Referenced from: pull request #285
Backported to: 4.1.3 (2020.0.3), 4.0.7 (Neumann SR7)
The text was updated successfully, but these errors were encountered: