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


##########
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/commands/AbstractCommandValidationTest.java:
##########
@@ -193,13 +194,14 @@ static CatalogCommand createZoneCommand(String zoneName, 
List<String> storagePro
     }
 
     static Catalog applyCommandsToCatalog(Catalog catalog, CatalogCommand... 
commandsToApply) {
+        UpdateContext updateContext = new UpdateContext(catalog);
         for (CatalogCommand command : commandsToApply) {
-            for (UpdateEntry updates : command.get(catalog)) {
-                catalog = updates.applyUpdate(catalog, 
INITIAL_CAUSALITY_TOKEN);
+            for (UpdateEntry updates : command.get(updateContext)) {
+                updateContext = new 
UpdateContext(updates.applyUpdate(updateContext.catalog(), 
INITIAL_CAUSALITY_TOKEN));

Review Comment:
   Why don't reuse updateContext instance and call 
`UpdateContext.updateCatalog()` instead of creating a new objectt.



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to