sanpwc commented on code in PR #5310:
URL: https://github.com/apache/ignite-3/pull/5310#discussion_r1975210242
##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -555,15 +561,28 @@ private CompletableFuture<?>
createZonePartitionReplicationNode(
this::calculateZoneAssignments,
rebalanceRetryDelayConfiguration
);
-
Supplier<CompletableFuture<Boolean>> startReplicaSupplier = () -> {
+ var storageIndexTracker = new PendingComparableValuesTracker<Long,
Void>(0L);
var eventParams = new
LocalPartitionReplicaEventParameters(zonePartitionId, revision);
- ZonePartitionResources zoneResources =
zoneResourcesManager.allocateZonePartitionResources(zonePartitionId,
partitionCount);
+ ZonePartitionResources zoneResources =
zoneResourcesManager.allocateZonePartitionResources(
+ zonePartitionId,
+ partitionCount,
+ storageIndexTracker
+ );
return
fireEvent(LocalPartitionReplicaEvent.BEFORE_REPLICA_STARTED, eventParams)
.thenCompose(v -> {
try {
+ // TODO Comment for reviewer. I assume that we
should not aggregate (min/max) tableStorages.lastAppliedIndex().
+ //
https://issues.apache.org/jira/browse/IGNITE-24517 will allow to init
storageIndexTracker with the value
+ // from
txStatePartitionStorage().lastAppliedIndex(), is that correct?
+
storageIndexTracker.update(zoneResources.txStatePartitionStorage().lastAppliedIndex(),
null);
Review Comment:
Moved to `ZonePartitionRaftListener#onSnapshotLoad`
--
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]