alievmirza commented on code in PR #3653:
URL: https://github.com/apache/ignite-3/pull/3653#discussion_r1583133269


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/storage/NewZoneEntry.java:
##########
@@ -72,13 +72,17 @@ public CatalogEventParameters createEventParameters(long 
causalityToken, int cat
     public Catalog applyUpdate(Catalog catalog, long causalityToken) {
         descriptor.updateToken(causalityToken);
 
+        int defaultZoneId = catalog.defaultZone() != null
+                ? catalog.defaultZone().id()
+                : descriptor.id();

Review Comment:
   I don't think that this is a good idea to introduce such non-trivial 
behaviour. At least we must document such behaviour, so it doesn't come as a 
surprise for an user



##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java:
##########
@@ -182,16 +177,22 @@ public CompletableFuture<Void> startAsync() {
                 INITIAL_CAUSALITY_TOKEN
         );
 
-        CatalogZoneDescriptor defaultZone = fromParams(
-                objectIdGen++,
-                DEFAULT_ZONE_NAME
-        );
+        Catalog emptyCatalog = new Catalog(0, 0L, objectIdGen, List.of(), 
List.of(publicSchema, systemSchema), null);
 
-        registerCatalog(new Catalog(0, 0L, objectIdGen, List.of(defaultZone), 
List.of(publicSchema, systemSchema), defaultZone.id()));
+        registerCatalog(emptyCatalog);
 
         updateLog.registerUpdateHandler(new OnUpdateHandlerImpl());
 
-        return updateLog.startAsync();
+        return updateLog.startAsync()
+                .thenCompose(none -> {
+                    if (latestCatalogVersion() == emptyCatalog.version()) {
+                        // node have not seen any updates yet, let's try to 
initialise

Review Comment:
   has



-- 
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