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

Add support for efficient removeAll

    XMLWordPrintable

Details

    Description

      Infinispan currently does not seem to implement an efficient way to clear an entire cache cluster-wide. This forces Hibernate to remove all entries one by one when a cache region needs to be cleared, for example when a buld CriteriaUpdate or CriteriaDelete is used.

      The behavior we are observing is:

      1. All nodes in the cluster are queried for the keyset in a region
      2. A lock seems to be in place for this region for the duration of the commit
      3. The initiating node constructs a message with InvalidateCommands for all keys
      4. This large message (230MB for 200k entries) is sent to all nodes in the cluster

      For large caches this can take very long. We had to increase the remote-timeout to 60 seconds to prevent timeouts. During this time, the entire cluster is locked an busy processing the cache invalidations. As you can understand, this is not a workable solution for us. On some places we can prevent the cache clear by updating the records one by one, but in other places this is not an option.

      The corresponding report at Hibernate can be found here: https://hibernate.atlassian.net/browse/HHH-12036

      Attachments

        Issue Links

          Activity

            People

              rvansa1@redhat.com Radim Vansa (Inactive)
              papegaaij Emond Papegaaij
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: