Details
-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
9.0.0.Beta1
Description
Currently dist and repl caches send RemoveExpiredCommand for each expired entry. That causes unnecessary overhead when there are no expiration listeners registered (expiring the entry at ~same moment on all nodes does not provide too much benefit without listeners).
As the command is executed in async thread and locks the entry, in can introduce extra delay to following write operation (or fail it if this has Flag.ZERO_LOCK_ACQUISITION_TIMEOUT).
There is a way to prevent the command using ExpirationManager.registerIncomingWrite but as this is implemented using a CHM write, it will cause non-trivial overhead and possible contention as well, even in cases the entry is not expired.
The only viable workaround ATM is replacing ClusterExpirationManager with ExpirationManagerImpl in component registry manually.