sanpwc commented on code in PR #2605:
URL: https://github.com/apache/ignite-3/pull/2605#discussion_r1339663555
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -288,6 +289,24 @@ public CompletableFuture<Set<String>> dataNodes(long
causalityToken, int zoneId)
return causalityDataNodesEngine.dataNodes(causalityToken, zoneId);
}
+ /**
+ * Returns the actual data nodes of the specified zone.
+ *
+ * @param zoneId Zone id.
+ * @return The future which will be completed with data nodes for the
zoneId.
+ */
+ public CompletableFuture<Set<String>> currentDataNodes(int zoneId) {
+ return
metaStorageManager.get(zoneDataNodesKey(zoneId)).thenApply(dataNodesEntry -> {
Review Comment:
So, you're mixing distributively current dataNodes with locally current zone
cfg, right? That seems incorrect.
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -288,6 +289,24 @@ public CompletableFuture<Set<String>> dataNodes(long
causalityToken, int zoneId)
return causalityDataNodesEngine.dataNodes(causalityToken, zoneId);
}
+ /**
+ * Returns the actual data nodes of the specified zone.
+ *
+ * @param zoneId Zone id.
+ * @return The future which will be completed with data nodes for the
zoneId.
+ */
+ public CompletableFuture<Set<String>> currentDataNodes(int zoneId) {
+ return
metaStorageManager.get(zoneDataNodesKey(zoneId)).thenApply(dataNodesEntry -> {
+ int catalogVersion = catalogManager.latestCatalogVersion();
Review Comment:
It's incorrect. Catalog latest version might be one step below over local
dataNodes. Please use causality token bounded dataNodes retrieval in order to
match catalog and dataNodes.
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/RebalanceRaftGroupEventsListener.java:
##########
@@ -306,6 +307,8 @@ private void
doOnNewPeersConfigurationApplied(PeersAndLearners configuration) {
)
).get();
+ Set<Assignment> calculatedAssignments =
calculateAssignmentsFn.apply(tablePartitionId).get();
Review Comment:
So, just blocking get(). Nice way to get a deadlock.
--
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]