sanpwc commented on code in PR #6977:
URL: https://github.com/apache/ignite-3/pull/6977#discussion_r2536801324
##########
modules/catalog-compaction/src/test/java/org/apache/ignite/internal/catalog/compaction/CatalogCompactionRunnerSelfTest.java:
##########
@@ -1255,7 +1248,6 @@ private CatalogCompactionRunner createRunner(
clockService,
schemaSyncService,
topologyService,
- new SystemPropertiesNodeProperties(),
Review Comment:
On line 1380+/- there's still `values.put(new TablePartitionId(table.id(),
i), minTime);`. Is it intended?
##########
modules/catalog-compaction/src/main/java/org/apache/ignite/internal/catalog/compaction/CatalogCompactionRunner.java:
##########
@@ -580,18 +571,17 @@ private CompletableFuture<Void> collectRequiredNodes(
int partitions = zone.partitions();
- List<ReplicationGroupId> replicationGroupIds = new
ArrayList<>(partitions);
+ List<ZonePartitionId> replicationGroupIds = new
ArrayList<>(partitions);
for (int p = 0; p < partitions; p++) {
- replicationGroupIds.add(nodeProperties.colocationEnabled() ? new
ZonePartitionId(table.zoneId(), p)
- : new TablePartitionId(table.id(), p));
+ replicationGroupIds.add(new ZonePartitionId(table.zoneId(), p));
}
return placementDriver.getAssignments(replicationGroupIds, nowTs)
.thenAccept(tokenizedAssignments -> {
assert tokenizedAssignments.size() ==
replicationGroupIds.size();
- if (nodeProperties.colocationEnabled() &&
currentCatalog.table(table.id()) == null) {
+ if (currentCatalog.table(table.id()) == null) {
// Table no longer exists
deletedTables.put(table.id(), true);
Review Comment:
Why it's still required to track deleted tables?
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/message/ReplicaRequest.java:
##########
@@ -24,5 +24,7 @@
*/
public interface ReplicaRequest extends NetworkMessage {
/** Gets a replication group id. */
+ // TODO https://issues.apache.org/jira/browse/IGNITE-22522
Review Comment:
I still hope that some day, we will refactor CMG/MG to use replicas. In that
case we may introduce MGReplciationGroupId or something like that. Thus it
seems reasonable to leave ReplicaRequest as is using ReplicationGroupId.
##########
modules/catalog-compaction/src/test/java/org/apache/ignite/internal/catalog/compaction/CatalogManagerCompactionFacadeTest.java:
##########
@@ -53,65 +46,6 @@ void setupHelper() {
catalogManagerFacade = new
CatalogManagerCompactionFacade(catalogManager);
}
- // TODO https://issues.apache.org/jira/browse/IGNITE-22522 Remove this
test.
- @Test
- void testCollectTablesWithPartitionsBetween() {
- CreateTableCommandBuilder tableCmdBuilder =
CreateTableCommand.builder()
- .schemaName("PUBLIC")
- .columns(List.of(columnParams("key1", INT32),
columnParams("key2", INT32), columnParams("val", INT32, true)))
-
.primaryKey(TableHashPrimaryKey.builder().columns(List.of("key1",
"key2")).build())
- .colocationColumns(List.of("key2"));
-
- DropTableCommandBuilder dropTableCommandBuilder =
DropTableCommand.builder()
- .schemaName("PUBLIC");
-
- long from1 = clockService.nowLong();
-
-
assertThat(catalogManager.execute(tableCmdBuilder.tableName("test1").build()),
willCompleteSuccessfully());
-
assertThat(catalogManager.execute(dropTableCommandBuilder.tableName("test1").build()),
willCompleteSuccessfully());
-
- long from2 = clockService.nowLong();
-
-
assertThat(catalogManager.execute(tableCmdBuilder.tableName("test2").build()),
willCompleteSuccessfully());
-
assertThat(catalogManager.execute(dropTableCommandBuilder.tableName("test2").build()),
willCompleteSuccessfully());
-
- long from3 = clockService.nowLong();
-
assertThat(catalogManager.execute(tableCmdBuilder.tableName("test3").build()),
willCompleteSuccessfully());
-
assertThat(catalogManager.execute(dropTableCommandBuilder.tableName("test3").build()),
willCompleteSuccessfully());
-
- {
- Int2IntMap tablesWithParts =
catalogManagerFacade.collectTablesWithPartitionsBetween(
- from1,
- clockService.nowLong());
-
- assertThat(tablesWithParts.keySet(), hasSize(3));
- }
-
- {
- Int2IntMap tablesWithParts =
catalogManagerFacade.collectTablesWithPartitionsBetween(
- from2,
- clockService.nowLong());
-
- assertThat(tablesWithParts.keySet(), hasSize(2));
- }
-
- {
- Int2IntMap tablesWithParts =
catalogManagerFacade.collectTablesWithPartitionsBetween(
- from3,
- clockService.nowLong());
-
- assertThat(tablesWithParts.keySet(), hasSize(1));
- }
-
- {
- Int2IntMap tablesWithParts =
catalogManagerFacade.collectTablesWithPartitionsBetween(
- clockService.nowLong(),
- clockService.nowLong());
-
- assertThat(tablesWithParts.keySet(), hasSize(0));
- }
- }
-
@Test
void testCollectZonesWithPartitionsBetween() {
Review Comment:
Not related to your change. There's a typo in `Int2IntMap tablesWithParts =
catalogManagerFacade.collectZonesWithPartitionsBetween(` and similar.
**zones**WithParts should be used instead. Could you please fix it?
##########
modules/catalog-compaction/src/main/java/org/apache/ignite/internal/catalog/compaction/CatalogManagerCompactionFacade.java:
##########
@@ -38,39 +37,6 @@ class CatalogManagerCompactionFacade {
this.catalogManager = catalogManager;
}
- // TODO https://issues.apache.org/jira/browse/IGNITE-22522 Remove this
method.
- /**
- * Scans catalog versions in a given time interval (including interval
boundaries).
- * Extracts all tables contained in these catalog versions and creates a
mapping
- * tableId -> number of partitions in this table.
Review Comment:
Not related to your change. There's a typo in
`collectZonesWithPartitionsBetween` javadoc : * zoneId -> number of
partitions in this **table**. Could you please fix it?
--
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]