sanpwc commented on code in PR #1572:
URL: https://github.com/apache/ignite-3/pull/1572#discussion_r1092860905
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -425,11 +431,48 @@ public TableManager(
new LinkedBlockingQueue<>(),
NamedThreadFactory.create(nodeName, "incoming-raft-snapshot",
LOG)
);
+
+ zonesWatchListener = new WatchListener() {
+ @Override
+ public void onUpdate(@NotNull WatchEvent evt) {
+ NamedConfigurationTree<TableConfiguration, TableView,
TableChange> tables = tablesCfg.tables();
+
+ int zoneId = extractZoneId(evt.entryEvent().newEntry().key());
+
+ Set<String> nodesIds =
ByteUtils.fromBytes(evt.entryEvent().newEntry().value());
+
+ for (int i = 0; i < tables.value().size(); i++) {
+ TableView tableView = tables.value().get(i);
+
+ int tableZoneId = tableView.zoneId();
+
+ if (zoneId == tableZoneId) {
+ TableConfiguration tableCfg =
tables.get(tableView.name());
+
+ for (int part = 0; part < tableView.partitions();
part++) {
+ UUID tableId = ((ExtendedTableConfiguration)
tableCfg).id().value();
+
+ TablePartitionId replicaGrpId = new
TablePartitionId(tableId, part);
+
+ updatePendingAssignmentsKeys(tableView.name(),
replicaGrpId, nodesIds, tableView.replicas(),
Review Comment:
Major one! So, you do ignore updatePendingAssignmentsKeys.
- What about exception handling?
- Should we try to await this futures on stop?
- How do you handle halted assignments recalculation?
- What about concurrent zone updates processing, are they ordered? Should we
cancel unfinished ones in case of new zone update?
--
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]