ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite-3] sanpwc commented on a change in pull request #334: IGNITE-15501 Improvements in ConfigurationExtension - support for listeners and internal schema extensions
Date Tue, 14 Sep 2021 09:09:17 GMT

sanpwc commented on a change in pull request #334:
URL: https://github.com/apache/ignite-3/pull/334#discussion_r708071391



##########
File path: modules/configuration/src/test/java/org/apache/ignite/internal/configuration/testframework/ConfigurationExtension.java
##########
@@ -160,16 +167,31 @@ private static Object cfgValue(
 
                     change.descend(copy);
 
-                    if (superRootRef.compareAndSet(sr, copy))
-                        return completedFuture(null);
+                    if (superRootRef.compareAndSet(sr, copy)) {
+                        List<CompletableFuture<?>> futures = new ArrayList<>();
+
+                        ConfigurationNotificationsUtil.notifyListeners(
+                            sr.getRoot(rootKey),
+                            copy.getRoot(rootKey),
+                            ((DynamicConfiguration<InnerNode, ?>)cfgRef.get()),
+                            ++storageRev,
+                            futures
+                        );
+
+                        return CompletableFuture.allOf(futures.toArray(new CompletableFuture[0]));

Review comment:
       In order to emulate configuration registry correctly, we should have following guaranties:
   - same notification order as in real-life configuration;
   - same non-fully-processing-awaiting logic of inner change notifications; 
   - same fully-processing-awaiting logic of cross change notifications;
   - same exception handling logic for exceptions thrown from listeners;




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message