kgusakov commented on code in PR #4649:
URL: https://github.com/apache/ignite-3/pull/4649#discussion_r1822428302
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -2189,19 +2190,20 @@ private CompletableFuture<Void>
handleChangePendingAssignmentEvent(
localServicesStartFuture = localPartitionsVv.get(revision)
// TODO https://issues.apache.org/jira/browse/IGNITE-20957
Revisit this code
.thenComposeAsync(
- partitionSet -> inBusyLock(busyLock, () ->
getOrCreatePartitionStorages(tbl, singlePartitionIdSet)),
+ unused -> inBusyLock(
+ busyLock,
+ () -> getOrCreatePartitionStorages(tbl,
singlePartitionIdSet)
+ .thenRun(() ->
localPartsByTableId.compute(
+ replicaGrpId.tableId(),
+ (tableId, oldPartitionSet)
-> extendPartitionSet(oldPartitionSet, partitionId)
+ ))
+ ),
ioExecutor
)
.thenComposeAsync(unused -> inBusyLock(busyLock, () -> {
- if (!isRecovery) {
Review Comment:
Could you explain why this check is not actual anymore?
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -2189,19 +2190,20 @@ private CompletableFuture<Void>
handleChangePendingAssignmentEvent(
localServicesStartFuture = localPartitionsVv.get(revision)
// TODO https://issues.apache.org/jira/browse/IGNITE-20957
Revisit this code
.thenComposeAsync(
- partitionSet -> inBusyLock(busyLock, () ->
getOrCreatePartitionStorages(tbl, singlePartitionIdSet)),
+ unused -> inBusyLock(
+ busyLock,
+ () -> getOrCreatePartitionStorages(tbl,
singlePartitionIdSet)
+ .thenRun(() ->
localPartsByTableId.compute(
Review Comment:
So, earlier we had a bug with no localPartsByTableId updates in this case,
am I right?
--
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]