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


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/events/AlterZoneEventParameters.java:
##########
@@ -23,25 +23,25 @@
  * Alter zone event parameters contains a distribution zone descriptor for 
newly created distribution zone.
  */
 public class AlterZoneEventParameters extends CatalogEventParameters {
-
-    private final CatalogZoneDescriptor zoneDescriptor;
+    private final CatalogZoneDescriptor descriptor;

Review Comment:
   But not for me.



##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/storage/AlterZoneEntry.java:
##########
@@ -37,12 +43,36 @@ public AlterZoneEntry(CatalogZoneDescriptor descriptor) {
         this.descriptor = descriptor;
     }
 
-    /** Returns descriptor of a zone to alter. */
+    /**
+     * Returns descriptor of a zone to alter.
+     */
     public CatalogZoneDescriptor descriptor() {
         return descriptor;
     }
 
-    /** {@inheritDoc} */
+    @Override
+    public CatalogEvent eventType() {
+        return CatalogEvent.ZONE_ALTER;
+    }
+
+    @Override
+    public CatalogEventParameters createEventParameters(long causalityToken, 
int catalogVersion) {
+        return new AlterZoneEventParameters(causalityToken, catalogVersion, 
descriptor);
+    }
+
+    @Override
+    public Catalog applyUpdate(Catalog catalog, VersionedUpdate update) {
+        return new Catalog(
+                update.version(),
+                update.activationTimestamp(),
+                catalog.objectIdGenState(),
+                catalog.zones().stream()
+                        .map(z -> z.id() == descriptor.id() ? descriptor : z)

Review Comment:
   Yep



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