ascherbakoff commented on code in PR #6307:
URL: https://github.com/apache/ignite-3/pull/6307#discussion_r2239344734


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -1940,20 +1941,29 @@ private CompletableFuture<List<BinaryRow>> 
processReadOnlyDirectMultiEntryAction
             ReadOnlyDirectMultiRowReplicaRequest request,
             HybridTimestamp opStartTimestamp) {
         List<BinaryTuple> primaryKeys = resolvePks(request.primaryKeys());
-        HybridTimestamp readTimestamp = opStartTimestamp;
 
-        if (request.requestType() != RO_GET_ALL) {
-            throw new IgniteInternalException(Replicator.REPLICA_COMMON_ERR,
-                    format("Unknown single request [actionType={}]", 
request.requestType()));
-        }
+        assert request.requestType() == RO_GET_ALL;
 
         CompletableFuture<BinaryRow>[] resolutionFuts = new 
CompletableFuture[primaryKeys.size()];
 
         for (int i = 0; i < primaryKeys.size(); i++) {
-            resolutionFuts[i] = resolveRowByPkForReadOnly(primaryKeys.get(i), 
readTimestamp);
+            resolutionFuts[i] = resolveRowByPkForReadOnly(primaryKeys.get(i), 
opStartTimestamp);
         }
 
-        return allOfToList(resolutionFuts);
+        return allOfToList(resolutionFuts).thenApply(rows -> {
+            // Validate read correctness.
+            HybridTimestamp lwm = lowWatermark.getLowWatermark();
+
+            if (lwm != null && opStartTimestamp.compareTo(lwm) < 0) {

Review Comment:
   Ok. We have other places with the similar code.



-- 
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