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

Add ability to process local events asynchronously

    XMLWordPrintableJSON

Details

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

    Description

      Local events (org.apache.ignite.internal.manager.Event) logic should be reworked a bit in order to await all subscribers to process corresponding event before publishing the action. Let's check an example of an expected behavior:

      1. TableManager prepares table for creation.
      2. TableManager notifies all subscribers with Table.CREATE event propagating to-be-created table.
      3. TableManager (with the help of org.apache.ignite.internal.manager.Producer) awaits all subscribers to acknowledge that Table.CREATE event was successfully processed. E.g.  SqlQueryProcessor prepares calcite schemes and sends ack by completing event's Future like it's done within ConfigurationRegistry events.
      4. TableManager on Compound-Like-Future.allOff(events) publishes corresponding action, e.g. makes table visible to everyone.

      Proposed solution is very similar to what we already have in ConfigurationRegistry

      public interface ConfigurationListener<VIEWT> {
          /**
           * Called on property value update.
           *
           * @param ctx Notification context.
           * @return Future that signifies the end of the listener execution.
           */
          CompletableFuture<?> onUpdate(ConfigurationNotificationEvent<VIEWT> ctx);
      }

      Attachments

        Issue Links

          Activity

            People

              Denis Chudov Denis Chudov
              alapin Alexander Lapin
              Votes:
              0 Vote for this issue
              Watchers:
              3 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