[
https://issues.apache.org/jira/browse/IGNITE-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16304319#comment-16304319
]
Denis Mekhanikov commented on IGNITE-6388:
------------------------------------------
There is {{IgniteCacheTxExpiryPolicyWithStoreTest#testGetReadThrough}} test,
that passes on master, but should actually fail. {{checkTtl()}} doesn't check,
that the *appropriate* TTL was chosen.
> ExpiryPolicy is used incorrectly during invoke
> ----------------------------------------------
>
> Key: IGNITE-6388
> URL: https://issues.apache.org/jira/browse/IGNITE-6388
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 1.7, 1.8, 1.9, 2.0, 2.1
> Reporter: Denis Mekhanikov
>
> Behavior of {{invoke(...)}} regarding {{ExpiryPolicy}} doesn't conform to the
> spec.
> Based on {{EntryProcessor}} doc, the expected behavior is:
> {code:java}
> cache.invoke(key, (e, a) -> {
> e.getValue(); // getExpiryForAccess()
> e.setValue(2);
> e.getValue();
> e.setValue(3); // getExpiryForUpdate()
> return e.getValue();
> });
> {code}
> {code:java}
> cache.invoke(key, (e, a) -> {
> e.getValue(); // getExpiryForAccess()
> e.remove();
> e.getValue();
> e.setValue(2); // getExpiryForUpdate()
> return e.getValue();
> });
> {code}
> {code:java}
> cache.invoke(key, (e, a) -> {
> e.getValue(); // getExpiryForAccess()
> e.setValue(2);
> e.getValue();
> e.setValue(3);
> e.remove();
> return e.getValue();
> });
> {code}
> Additionally, if {{CacheStore}} with read-through is configured, and the
> accessed value wasn't loaded before, then {{getExpiryForCreation()}} should
> be called.
> Currently behavior depends on configured atomicity mode and none of observed
> options conform to the spec.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)