Hello,
hazelcast 4.2.6.
I have a map using an entry processor. Every time an element is found on the cache we increment an integer field by calling the 'addHit()' method that calls the entry processor:
public void addHit(String key) {
this.mapRecache.executeOnKey(key,
this::applyHitToKey);
}
// This is the entry processor
private boolean applyHitToKey(Map.Entry<String, HitInfo> entry) {
entry.setValue(entry.getValue().addHit());
return true;
}
The point is after increment this value, the expiration time and TTL fields are changed:
These are the values before/after executing the entry processor:
(BEFORE)
addHit :: EntryView{key=36|null|1|null|null|2023-01-21|2023-01-25|9.1|10.<null>|11.0|13.AO-B0<_>AO-B1|, value=com.ventusproxy.proxy.cache.reglas.recache.HitInfo@427d2fe, cost=1198, creationTime=1675077655000, expirationTime=1675077675000, hits=0, lastAccessTime=0, lastStoredTime=0, lastUpdateTime=1675077655000, version=0, ttl=20000, maxIdle=9223372036854775807}
(AFTER)
addHit :: EntryView{key=36|null|1|null|null|2023-01-21|2023-01-25|9.1|10.<null>|11.0|13.AO-B0<_>AO-B1|, value=com.ventusproxy.proxy.cache.reglas.recache.HitInfo@427e946, cost=1198, creationTime=1675077655000, expirationTime=9223372036854775807, hits=1, lastAccessTime=1675077660000, lastStoredTime=0, lastUpdateTime=1675077660000, version=1, ttl=9223372036854775807, maxIdle=9223372036854775807}
The consequence is that entries never expire.
Is this a bug or I'm doing something wrong?
Thanks,
Joan.