You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "sanpwc (via GitHub)" <gi...@apache.org> on 2023/09/26 13:40:51 UTC

[GitHub] [ignite-3] sanpwc commented on a diff in pull request #2627: IGNITE-20486 Protect write intent resolution with busy locks

sanpwc commented on code in PR #2627:
URL: https://github.com/apache/ignite-3/pull/2627#discussion_r1337230676


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -1507,31 +1507,33 @@ private CompletableFuture<BinaryRow> resolveRowByPkForReadOnly(BinaryTuple pk, H
                 // This means that we can just resolve the state of this transaction.
                 checkWriteIntentsBelongSameTx(writeIntents);
 
-                return resolveWriteIntentReadability(writeIntent, ts)
-                        .thenApply(writeIntentReadable -> {
-                            if (writeIntentReadable) {
-                                return findAny(writeIntents, wi -> !wi.isEmpty()).map(ReadResult::binaryRow).orElse(null);
-                            } else {
-                                for (ReadResult wi : writeIntents) {
-                                    HybridTimestamp newestCommitTimestamp = wi.newestCommitTimestamp();
+                return inBusyLockAsync(busyLock, () ->
+                        resolveWriteIntentReadability(writeIntent, ts)
+                                .thenApply(writeIntentReadable -> {

Review Comment:
   Does inBusyLockAsync protects thenApply()?



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org