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

Coalesce updates to a given key to a single operation within a transaction

XMLWordPrintable

      Following code run with optimistic caches:

      start tx
      put k, v1
      put k, v2
      put k, v3
      commit

      Would cause the PrepareCommand that is sent around to contain 3 PutKeyvalueCommands which is sub-optimal. What we can do is to only send the last written value (i.e. k v3) and ignore the previous two (reuse the code in AsyncCacheStore). Besides reducing the payload, from this would benefit the AtomicHashMaps which uses this code quite a lot and also the OptimisticLockingInterceptor which would not attempt to order the keys.

      I guess this should be a feature that is disabled by default, as I don't think it is required in general. Might as well be not configurable, enabled by default feature. Comments?

              pruivo@redhat.com Pedro Ruivo
              mircea.markus Mircea Markus (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: