Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23745

Add increment API to Key/Value Store

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.2
    • Component/s: Key/Value Store
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      New APIs are available on KeyValueStore.

      Optimized storage of Long values:

      • put(String key, Long value)
      • put(String key, Long value, long ttl)
      • getLong(String key)
      • getLongs(Collection<String> keys)

      Atomic increment:

      • addAndGet(String key, long delta)
      Show
      New APIs are available on KeyValueStore . Optimized storage of Long values: put(String key, Long value) put(String key, Long value, long ttl) getLong(String key) getLongs(Collection<String> keys) Atomic increment: addAndGet(String key, long delta)
    • Sprint:
      nxFG 10.1.2, nxFG 10.2.1
    • Story Points:
      3

      Description

      In order to improve atomic increments in the Key/Value store, it would be better to provide this API directly instead of having the caller rely on manual compareAndSet.

      In order to increment efficiently in MongoDB, this will also require extending the values data model to allow long values in addition to the current byte[] and String.

      This would allow the implementation of a KeyValueUIDSequencer that would therefore not depend on a specific storage backend.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h