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


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java:
##########
@@ -363,6 +361,30 @@ public CompletableFuture<Boolean> compactCatalog(long 
timestamp) {
         return updateLog.saveSnapshot(new SnapshotEntry(catalog));
     }
 
+    private CompletableFuture<Void> createDefaultZone(Catalog emptyCatalog) {
+        List<UpdateEntry> createZoneEntries = CreateZoneCommand.builder()
+                .zoneName(DEFAULT_ZONE_NAME)
+                .partitions(DEFAULT_PARTITION_COUNT)
+                .replicas(DEFAULT_REPLICA_COUNT)
+                .dataNodesAutoAdjustScaleUp(IMMEDIATE_TIMER_VALUE)
+                .dataNodesAutoAdjustScaleDown(INFINITE_TIMER_VALUE)
+                .filter(DEFAULT_FILTER)
+                .storageProfilesParams(
+                        
List.of(StorageProfileParams.builder().storageProfile(CatalogService.DEFAULT_STORAGE_PROFILE).build())
+                )
+                .build()
+                .get(emptyCatalog);
+
+        return updateLog.append(new VersionedUpdate(emptyCatalog.version() + 
1, 0L, createZoneEntries))
+                .handle((result, error) -> {
+                    if (error != null) {
+                        LOG.warn("Unable to create default zone.", error);

Review Comment:
   in that case you will get validation error (see 
[this](https://github.com/apache/ignite-3/pull/3653/files#diff-46682bbd0f65a3926b40f44aeb4322270a21764690a6aa8f556eb908827e5c18R114))



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