alievmirza commented on code in PR #4282:
URL: https://github.com/apache/ignite-3/pull/4282#discussion_r1732316222
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/ZoneRebalanceRaftGroupEventsListener.java:
##########
@@ -131,6 +125,9 @@ public class ZoneRebalanceRaftGroupEventsListener
implements RaftGroupEventsList
/** Attempts to retry the current rebalance in case of errors. */
private final AtomicInteger rebalanceAttempts = new AtomicInteger(0);
+ /** Function that calculates assignments for table's partition. */
Review Comment:
not table's, but zone's
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/ZoneRebalanceRaftGroupEventsListener.java:
##########
@@ -307,12 +301,11 @@ private void
scheduleChangePeersAndLearners(PeersAndLearners peersAndLearners, l
/**
* Updates stable value with the new applied assignment.
*/
- static void doStableKeySwitch(
+ private static void doStableKeySwitch(
Set<Assignment> stableFromRaft,
ZonePartitionId zonePartitionId,
MetaStorageManager metaStorageMgr,
- CatalogService catalogService,
- DistributionZoneManager distributionZoneManager
+ BiFunction<ZonePartitionId, Long,
CompletableFuture<Set<Assignment>>> calculateAssignmentsFn
Review Comment:
let's make
`org.apache.ignite.internal.distributionzones.rebalance.RebalanceRaftGroupEventsListener#doStableKeySwitch`
also static
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/ZoneRebalanceRaftGroupEventsListener.java:
##########
@@ -146,16 +143,14 @@ public ZoneRebalanceRaftGroupEventsListener(
IgniteSpinBusyLock busyLock,
PartitionMover partitionMover,
ScheduledExecutorService rebalanceScheduler,
- CatalogService catalogService,
- DistributionZoneManager distributionZoneManager
+ BiFunction<ZonePartitionId, Long,
CompletableFuture<Set<Assignment>>> calculateAssignmentsFn
Review Comment:
javadoc of the constructor must be improved with the new param
--
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]