Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7338

Don't send RemoveExpiredCommand when no expiration listeners are registered

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • 9.0.0.Beta1
    • Core

    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.

      Attachments

        Activity

          People

            wburns@redhat.com Will Burns
            rvansa1@redhat.com Radim Vansa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: