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/08 19:59:28 UTC

[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2094: IGNITE-18537 Add add/drop distribution zone DDL commands

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


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptor.java:
##########
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.catalog.descriptors;
+
+import org.apache.ignite.internal.tostring.S;
+
+/**
+ * Distribution zone descriptor base class.
+ */
+public class CatalogZoneDescriptor extends CatalogObjectDescriptor {
+    private static final long serialVersionUID = 1093607327002694066L;
+
+    /** Amount of zone partitions. */
+    private final int partitions;
+
+    /** Amount of zone replicas. */
+    private final int replicas;
+
+    /** Data nodes auto adjust timeout. */
+    private final int dataNodesAutoAdjust;
+
+    /** Data nodes auto adjust scale up timeout. */
+    private final int dataNodesAutoAdjustScaleUp;
+
+    /** Data nodes auto adjust scale down timeout. */
+    private final int dataNodesAutoAdjustScaleDown;
+
+    /** Nodes filer. */
+    private final String filter;
+
+    /**
+     * Constructs a distribution zone descriptor.
+     *
+     * @param id Id of the distribution zone.
+     * @param name Name of the zone.
+     * @param partitions Amount of partitions in distributions zone.
+     * @param replicas Amount of partition replicas.
+     * @param dataNodesAutoAdjust Data nodes auto adjust timeout.
+     * @param dataNodesAutoAdjustScaleUp Data nodes auto adjust scale up timeout.
+     * @param dataNodesAutoAdjustScaleDown Data nodes auto adjust scale down timeout.
+     * @param filter Nodes filter.
+     */
+    public CatalogZoneDescriptor(
+            int id,
+            String name,
+            int partitions,
+            int replicas,
+            int dataNodesAutoAdjust,

Review Comment:
   I just copy all parameters from configuration.
   `dataNodesAutoAdjust` looks like incomplete feature IGNITE-18134, assuming a bit more than just to set scaleUp and scaleDown to the same value.
   Maybe you are right and it can be safely dropped from descriptor, and apply optimization (described in IGNITE-18234) when both scaleUp and scaleDown values are equals. But the ticket description is not clear for me to make such decision.



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