You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "AMashenkov (via GitHub)" <gi...@apache.org> on 2023/06/21 14:13:36 UTC

[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2231: IGNITE-19641 Catalog events are triggered too early.

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


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogServiceImpl.java:
##########
@@ -651,18 +456,12 @@ public CompletableFuture<Void> createDistributionZone(CreateZoneParams params) {
         });
     }
 
-    /** {@inheritDoc} */
     @Override
     public CompletableFuture<Void> dropDistributionZone(DropZoneParams params) {
         return saveUpdate(catalog -> {
-            String zoneName = Objects.requireNonNull(params.zoneName(), "zone");
+            CatalogZoneDescriptor zone = getZone(catalog, params.zoneName());
 
-            CatalogZoneDescriptor zone = catalog.zone(zoneName);
-
-            if (zone == null) {
-                throw new DistributionZoneNotFoundException(zoneName);
-            }
-            if (zone.name().equals(CatalogService.DEFAULT_ZONE_NAME)) {
+            if (zone.name().equals(DEFAULT_ZONE_NAME)) {
                 //TODO IGNITE-19082 Can default zone be dropped?

Review Comment:
   Default zone can't be dropped. Later, we may allow to change default zone
   https://issues.apache.org/jira/browse/IGNITE-19687
   
   Let's just drop the todo.



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