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

DeltaAware support for conditional operations

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Do
    • Major
    • None
    • None
    • Core
    • None

    Description

      Current delta-aware approach is implemented only in PutKeyValueCommand and ApplyDeltaCommand. This implementation does not allow to execute conditional delta-aware commands - or rather it does not allow to return any kind of value (the condition itself can be implemented inside the delta).

      One use-case when this would be required is equivalent of AtomicLong.getAndIncrement(). Currently we can implement this using

      Long previous;
      do {
          previous = cache.get(key);
      } while (cache.replace(key, previous, previous + 1);
      

      which requires at least two RPCs. With more generic interface, such as JCache's EntryProcessor this could be implemented using single RPC.

      (so, this JIRA is basically a request to native support for EntryProcessor)

      Attachments

        Activity

          People

            Unassigned Unassigned
            rvansa1@redhat.com Radim Vansa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: