Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14269

Design conditional multi update functionality for meta storage client

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha5
    • None
    • Docs Required, Release Notes Required

    Description

      Define entities required for implementation of conditional multi updates (aka "transactions") for meta storage.

      Requirements:

      • Design should provide possibility to define conditional updates in if-then-else manner with nested branches.
      • Update always starts with condition.
      • Any nested branch must start with condition.
      • Update can't precede to condition.
      • Every branch can yield exactly one custom result (limited by number of simple types) and any number of entries. Corresponding expression always must be at the end of branch.
      • Condition for entry revision allows the following comparisons: equal, !equal, less, greater.
      • Condition for entry value allows the following operations (byte-wise): equal, !equal.
      • Update allows the following operations: put, remove, no-op.
      • Condition can not use previously defined condition instance again because it will lead to graph cycle and infinite update execution.

      Assumptions:

      • It seems that conditions and updates entities can be conveniently linked using chaining.

      Simple example (pseudocode):

          CompletableFuture<Result, List<Entry>> = invoke(valCond(EQUAL, perstEnabled, true)._then(
                   valCond(EQUAL, walEnabled, true)._then(
                           update(walEnabled, true)).
                   _else(
                           update(walEnabled, false))
                  )._else(NoopUpdate))
      
      

      Attachments

        Issue Links

          Activity

            People

              kgusakov Kirill Gusakov
              agura Andrey N. Gura
              Vyacheslav Koptilin Vyacheslav Koptilin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m