You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "denis-chudov (via GitHub)" <gi...@apache.org> on 2025/09/16 15:37:26 UTC
[PR] IGNITE-26395 Correct processing of initial empty data nodes [ignite-3]
denis-chudov opened a new pull request, #6604:
URL: https://github.com/apache/ignite-3/pull/6604
https://issues.apache.org/jira/browse/IGNITE-26395
--
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
Re: [PR] IGNITE-26395 Correct processing of initial empty data nodes [ignite-3]
Posted by "denis-chudov (via GitHub)" <gi...@apache.org>.
denis-chudov commented on code in PR #6604:
URL: https://github.com/apache/ignite-3/pull/6604#discussion_r2387889925
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/exception/EmptyDataNodesException.java:
##########
@@ -15,17 +15,25 @@
* limitations under the License.
*/
-package org.apache.ignite.internal.cluster.management;
+package org.apache.ignite.internal.distributionzones.exception;
-import static org.apache.ignite.lang.ErrorGroups.CommonConfiguration.CONFIGURATION_VALIDATION_ERR;
+import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
+import static org.apache.ignite.lang.ErrorGroups.DistributionZones.EMPTY_DATA_NODES_ERR;
-import org.apache.ignite.internal.lang.IgniteInternalException;
+import org.apache.ignite.lang.IgniteException;
/**
- * Exception representing invalid node configuration.
+ * Exception thrown when there are no data nodes for the given zone.
*/
-public class InvalidNodeConfigurationException extends IgniteInternalException {
- public InvalidNodeConfigurationException(String message) {
- super(CONFIGURATION_VALIDATION_ERR, message);
+public class EmptyDataNodesException extends IgniteException {
+ private static final long serialVersionUID = 5691362165660196984L;
+
+ /**
+ * Constructor.
+ *
+ * @param zoneId Zone ID.
+ */
+ public EmptyDataNodesException(int zoneId) {
+ super(EMPTY_DATA_NODES_ERR, format("Empty data nodes for zone [zoneId={}].", zoneId));
Review Comment:
1. I am not sure it is user-facing, it's internal exception showing the failure of some internal mechanics, like ReplicationTimeoutException or PrimaryReplicaAwaitTimeoutException. It should be wrapped into public user-facing exception like SqlException and may be root cause of it.
2.
3. because of 1, I think it's not necessary, and it would complicate the code because we would need additional dependency for resolving the zone name by id.
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/exception/EmptyDataNodesException.java:
##########
@@ -15,17 +15,25 @@
* limitations under the License.
*/
-package org.apache.ignite.internal.cluster.management;
+package org.apache.ignite.internal.distributionzones.exception;
-import static org.apache.ignite.lang.ErrorGroups.CommonConfiguration.CONFIGURATION_VALIDATION_ERR;
+import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
+import static org.apache.ignite.lang.ErrorGroups.DistributionZones.EMPTY_DATA_NODES_ERR;
-import org.apache.ignite.internal.lang.IgniteInternalException;
+import org.apache.ignite.lang.IgniteException;
/**
- * Exception representing invalid node configuration.
+ * Exception thrown when there are no data nodes for the given zone.
*/
-public class InvalidNodeConfigurationException extends IgniteInternalException {
- public InvalidNodeConfigurationException(String message) {
- super(CONFIGURATION_VALIDATION_ERR, message);
+public class EmptyDataNodesException extends IgniteException {
+ private static final long serialVersionUID = 5691362165660196984L;
+
+ /**
+ * Constructor.
+ *
+ * @param zoneId Zone ID.
+ */
+ public EmptyDataNodesException(int zoneId) {
+ super(EMPTY_DATA_NODES_ERR, format("Empty data nodes for zone [zoneId={}].", zoneId));
Review Comment:
1. I am not sure it is user-facing, it's internal exception showing the failure of some internal mechanics, like ReplicationTimeoutException or PrimaryReplicaAwaitTimeoutException. It should be wrapped into public user-facing exception like SqlException and may be root cause of it.
2. because of 1, I think it's not necessary, and it would complicate the code because we would need additional dependency for resolving the zone name by id.
--
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
Re: [PR] IGNITE-26395 Correct processing of initial empty data nodes [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc merged PR #6604:
URL: https://github.com/apache/ignite-3/pull/6604
--
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
Re: [PR] IGNITE-26395 Correct processing of initial empty data nodes [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #6604:
URL: https://github.com/apache/ignite-3/pull/6604#discussion_r2387327695
##########
modules/placement-driver-api/src/main/java/org/apache/ignite/internal/placementdriver/EmptyAssignmentsException.java:
##########
@@ -15,14 +15,26 @@
* limitations under the License.
*/
-package org.apache.ignite.internal.cli.commands.sql.planner;
+package org.apache.ignite.internal.placementdriver;
+
+import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
+import static org.apache.ignite.lang.ErrorGroups.PlacementDriver.EMPTY_ASSIGNMENTS_ERR;
+
+import org.apache.ignite.internal.replicator.ReplicationGroupId;
+import org.apache.ignite.lang.IgniteException;
/**
- * Tests for {@link SqlPlannerReplCommand}.
+ * Exception thrown when there are no assignments available.
*/
-public class ItSqlPlannerReplCommandTest extends ItSqlPlannerCommandTest {
- @Override
- protected Class<?> getCommandClass() {
- return SqlPlannerReplCommand.class;
+public class EmptyAssignmentsException extends IgniteException {
+ private static final long serialVersionUID = 1698246028174494488L;
+
+ /**
+ * Constructor.
+ *
+ * @param groupId Replication group id.
+ */
+ public EmptyAssignmentsException(ReplicationGroupId groupId) {
+ super(EMPTY_ASSIGNMENTS_ERR, format("Empty assignments for group [groupId={}].", groupId));
Review Comment:
Same as for EmptyDataNodesException
--
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
Re: [PR] IGNITE-26395 Correct processing of initial empty data nodes [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #6604:
URL: https://github.com/apache/ignite-3/pull/6604#discussion_r2387283416
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/RebalanceUtil.java:
##########
@@ -390,6 +390,12 @@ public static CompletableFuture<Void> triggerAllTablePartitionsRebalance(
return tableStableAssignments(metaStorageManager, tableDescriptor.id(), partitionIds)
.thenCompose(stableAssignments -> {
+ // In a case of empty assignments due to initially empty data nodes, assignments will be recalculated
Review Comment:
Usually it's just "In case".
--
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
Re: [PR] IGNITE-26395 Correct processing of initial empty data nodes [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #6604:
URL: https://github.com/apache/ignite-3/pull/6604#discussion_r2387169818
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/exception/EmptyDataNodesException.java:
##########
@@ -15,17 +15,25 @@
* limitations under the License.
*/
-package org.apache.ignite.internal.cluster.management;
+package org.apache.ignite.internal.distributionzones.exception;
-import static org.apache.ignite.lang.ErrorGroups.CommonConfiguration.CONFIGURATION_VALIDATION_ERR;
+import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
+import static org.apache.ignite.lang.ErrorGroups.DistributionZones.EMPTY_DATA_NODES_ERR;
-import org.apache.ignite.internal.lang.IgniteInternalException;
+import org.apache.ignite.lang.IgniteException;
/**
- * Exception representing invalid node configuration.
+ * Exception thrown when there are no data nodes for the given zone.
*/
-public class InvalidNodeConfigurationException extends IgniteInternalException {
- public InvalidNodeConfigurationException(String message) {
- super(CONFIGURATION_VALIDATION_ERR, message);
+public class EmptyDataNodesException extends IgniteException {
+ private static final long serialVersionUID = 5691362165660196984L;
+
+ /**
+ * Constructor.
+ *
+ * @param zoneId Zone ID.
+ */
+ public EmptyDataNodesException(int zoneId) {
+ super(EMPTY_DATA_NODES_ERR, format("Empty data nodes for zone [zoneId={}].", zoneId));
Review Comment:
It actually looks like user-facing exception (despite the fact that it's in internal package).
1. Should we move it from internal to public package?
2. Should we add zone name to exception params?
--
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
Re: [PR] IGNITE-26395 Correct processing of initial empty data nodes [ignite-3]
Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #6604:
URL: https://github.com/apache/ignite-3/pull/6604#discussion_r2387284969
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/ZoneRebalanceUtil.java:
##########
@@ -398,8 +398,12 @@ static CompletableFuture<Void> triggerZonePartitionsRebalance(
int finalPartId = partId;
partitionFutures[partId] = zoneAssignmentsFut.thenCompose(zoneAssignments -> inBusyLockAsync(busyLock, () -> {
- // TODO https://issues.apache.org/jira/browse/IGNITE-26395 We should distinguish empty stable assignments on
- // TODO node recovery in case of interrupted table creation, and moving from empty assignments to non-empty.
+ // In a case of empty assignments due to initially empty data nodes, assignments will be recalculated
Review Comment:
Same as above "In case"
--
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