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

Parallel Meta Storage Watch processing

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • persistence

    Description

      Currently Meta Storage Watches follow the given contract:

      1. All listeners are processed sequentially in the order that they have been registered;
      2. All listeners are processed in the same thread;
      3. All notifications are grouped by a particular revision. After all events for a particular revision get processed, all modified keys are persisted into the Vault.

      Some components may rely on this to ensure that dependent components can observe the most recent component state, because they registered their Meta Storage listeners after the component they depend on, therefore it is guaranteed that that component has already processed current Meta Storage revision.

      This approach can be improved in terms of performance by enabling concurrent Watch processing in multiple threads. In order to do that, we need to check and fix the following places:

      1. If a component depends on another component's state, this state must be extracted into a Versioned Value;
      2. If a component updates its state, relying on the fact, that this state is always updated in a single thread, concurrent primitives must be introduced to ensure thread safety;
      3. Check if it is possible to persist updated keys in the Vault individually, thus making it possible not to wait for all Watches for a particular revision to complete before starting to process updates belonging to the next revision.

      Attachments

        Issue Links

          Activity

            People

              apolovtcev Aleksandr Polovtsev
              sergeychugunov Sergey Chugunov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 1h
                  1h