AMashenkov commented on code in PR #3040:
URL: https://github.com/apache/ignite-3/pull/3040#discussion_r1450250503


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java:
##########
@@ -321,8 +328,10 @@ public CompletableFuture<Void> 
execute(List<CatalogCommand> commands) {
     }
 
     private void registerCatalog(Catalog newCatalog) {
-        catalogByVer.put(newCatalog.version(), newCatalog);
-        catalogByTs.put(newCatalog.time(), newCatalog);
+        inBusyLock(busyLock, () -> {
+            catalogByVer.put(newCatalog.version(), newCatalog);
+            catalogByTs.put(newCatalog.time(), newCatalog);
+        });

Review Comment:
   This method is called in `OnUpdateHandlerImpl.handle(...)`.
   ` handleFutures.add(onUpdateHandler.handle(update, event.timestamp(), 
event.revision()));`
   It make sense to guard the `UpdateListener.onUpdate(WatchEvent)` with 
busylock instead.
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to