You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sk...@apache.org on 2025/04/29 09:56:37 UTC
(ignite-3) branch main updated: IGNITE-25256 Fix ItRebalanceWithPartitionReturnTest when the colocation is enabled (#5720)
This is an automated email from the ASF dual-hosted git repository.
sk0x50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new aeb1e23e2c2 IGNITE-25256 Fix ItRebalanceWithPartitionReturnTest when the colocation is enabled (#5720)
aeb1e23e2c2 is described below
commit aeb1e23e2c28c5891b6aee7997b82802a974be56
Author: Slava Koptilin <sl...@gmail.com>
AuthorDate: Tue Apr 29 12:56:31 2025 +0300
IGNITE-25256 Fix ItRebalanceWithPartitionReturnTest when the colocation is enabled (#5720)
---
.../table/ItRebalanceWithPartitionReturnTest.java | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItRebalanceWithPartitionReturnTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItRebalanceWithPartitionReturnTest.java
index 1e474d7b407..3c199cd02f9 100644
--- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItRebalanceWithPartitionReturnTest.java
+++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItRebalanceWithPartitionReturnTest.java
@@ -22,6 +22,7 @@ import static org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERS
import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
import static org.apache.ignite.internal.TestWrappers.unwrapTableImpl;
import static org.apache.ignite.internal.catalog.commands.CatalogUtils.DEFAULT_FILTER;
+import static org.apache.ignite.internal.lang.IgniteSystemProperties.enabledColocation;
import static org.apache.ignite.internal.testframework.IgniteTestUtils.waitForCondition;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -41,7 +42,9 @@ import org.apache.ignite.internal.ConfigOverrides;
import org.apache.ignite.internal.app.IgniteImpl;
import org.apache.ignite.internal.catalog.descriptors.ConsistencyMode;
import org.apache.ignite.internal.partitiondistribution.Assignment;
+import org.apache.ignite.internal.replicator.PartitionGroupId;
import org.apache.ignite.internal.replicator.TablePartitionId;
+import org.apache.ignite.internal.replicator.ZonePartitionId;
import org.apache.ignite.sql.ResultSet;
import org.apache.ignite.sql.SqlRow;
import org.junit.jupiter.api.AfterEach;
@@ -174,9 +177,13 @@ public class ItRebalanceWithPartitionReturnTest extends ClusterPerTestIntegratio
Set<String> nodeNames = new HashSet<>();
for (int j = 0; j < partCount; j++) {
+ PartitionGroupId replicationGroupId = enabledColocation()
+ ? new ZonePartitionId(tableImpl.zoneId(), j)
+ : new TablePartitionId(tableImpl.tableId(), j);
+
Set<Assignment> nodes = unwrapIgniteImpl(node0)
.placementDriver()
- .getAssignments(new TablePartitionId(tableImpl.tableId(), j), igniteImpl.clock().current())
+ .getAssignments(replicationGroupId, igniteImpl.clock().current())
.join()
.nodes();
@@ -189,9 +196,13 @@ public class ItRebalanceWithPartitionReturnTest extends ClusterPerTestIntegratio
Set<String> nodeNames = new HashSet<>();
for (int j = 0; j < partCount; j++) {
+ PartitionGroupId replicationGroupId = enabledColocation()
+ ? new ZonePartitionId(tableImpl.zoneId(), j)
+ : new TablePartitionId(tableImpl.tableId(), j);
+
Set<Assignment> nodes = unwrapIgniteImpl(node0)
.placementDriver()
- .getAssignments(new TablePartitionId(tableImpl.tableId(), j), igniteImpl.clock().current())
+ .getAssignments(replicationGroupId, igniteImpl.clock().current())
.join()
.nodes();
@@ -233,9 +244,13 @@ public class ItRebalanceWithPartitionReturnTest extends ClusterPerTestIntegratio
Set<String> nodeNames = new HashSet<>();
for (int j = 0; j < partCount; j++) {
+ PartitionGroupId replicationGroupId = enabledColocation()
+ ? new ZonePartitionId(tableImpl.zoneId(), j)
+ : new TablePartitionId(tableImpl.tableId(), j);
+
Set<Assignment> nodes = unwrapIgniteImpl(node0)
.placementDriver()
- .getAssignments(new TablePartitionId(tableImpl.tableId(), j), igniteImpl.clock().current())
+ .getAssignments(replicationGroupId, igniteImpl.clock().current())
.join()
.nodes();