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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2308,38 +2355,31 @@ private CompletableFuture<BinaryRow> 
resolveRoReadResult(
      * @param readResult Read result to resolve.
      * @param txId Nullable transaction id, should be provided if resolution 
is performed within the context of RW transaction.
      * @param timestamp Timestamp is used in RO transaction only.
-     * @param lastCommitted Action to get the latest committed row, it is used 
in RO transaction only.
+     * @param lastCommitted Action to get the latest committed row.
      * @return Future to resolved binary row.
      */
     private CompletableFuture<BinaryRow> resolveReadResult(
             ReadResult readResult,
             @Nullable UUID txId,
             @Nullable HybridTimestamp timestamp,
-            @Nullable Supplier<BinaryRow> lastCommitted
+            Supplier<BinaryRow> lastCommitted
     ) {
         if (readResult == null) {
             return completedFuture(null);
+        } else if (!readResult.isWriteIntent()) {
+            return completedFuture(readResult.binaryRow());
         } else {
+            // RW resolution.
             if (txId != null) {

Review Comment:
   According to the TxManagerImpl.begin() it's not true
   ```
       public InternalTransaction begin(boolean readOnly, @Nullable 
HybridTimestamp observableTimestamp) {
           assert readOnly || observableTimestamp == null : "Observable 
timestamp is applicable just for read-only transactions.";
   
           HybridTimestamp beginTimestamp = clock.now();
           UUID txId = transactionIdGenerator.transactionIdFor(beginTimestamp);
           changeState(txId, null, PENDING);
   
           if (!readOnly) {
               return new ReadWriteTransactionImpl(this, txId);
           }
   ```



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to