sanpwc commented on code in PR #5310:
URL: https://github.com/apache/ignite-3/pull/5310#discussion_r1975213262
##########
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);
+
+ // TODO
https://issues.apache.org/jira/browse/IGNITE-24654 Properly close
storageIndexTracker.
+ // internalTbl.updatePartitionTrackers is used in
order to add storageIndexTracker to some context for further
+ // storage closing.
+ // internalTbl.updatePartitionTrackers(partId,
safeTimeTracker, storageIndexTracker);
Review Comment:
In order not to forget that stoageIndexTracker should be properly closed and
in order to close it, it's required to put it somewhere. In case of tables
`internalTbl.updatePartitionTrackers` was used for that. I believe that we will
use ZonePartitionResources however I'd rather cover it with dedicated ticket -
https://issues.apache.org/jira/browse/IGNITE-24654
--
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]