ygerzhedovich commented on code in PR #1501:
URL: https://github.com/apache/ignite-3/pull/1501#discussion_r1087818182
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java:
##########
@@ -962,6 +977,60 @@ private Publisher<BinaryRow> scan(
);
}
+
+ /** {@inheritDoc} */
+ @Override
+ public Publisher<BinaryRow> scan(
+ int partId,
+ UUID txId,
+ ClusterNode leaderNode,
+ long leaderTerm,
+ @Nullable UUID indexId,
+ @Nullable BinaryTuplePrefix lowerBound,
+ @Nullable BinaryTuplePrefix upperBound,
+ int flags,
+ @Nullable BitSet columnsToInclude
+ ) {
+ return scan(partId, txId, leaderNode, leaderTerm, indexId, null,
lowerBound, upperBound, flags, columnsToInclude);
+ }
+
+ private Publisher<BinaryRow> scan(
+ int partId,
+ UUID txId,
+ ClusterNode recipientNode,
+ long term,
+ @Nullable UUID indexId,
+ @Nullable BinaryTuple exactKey,
+ @Nullable BinaryTuplePrefix lowerBound,
+ @Nullable BinaryTuplePrefix upperBound,
+ int flags,
+ @Nullable BitSet columnsToInclude
+ ) {
+ return new PartitionScanPublisher(
+ (scanId, batchSize) -> {
+ ReplicationGroupId partGroupId =
partitionMap.get(partId).groupId();
+
+ ReadWriteScanRetrieveBatchReplicaRequest request =
tableMessagesFactory.readWriteScanRetrieveBatchReplicaRequest()
+ .groupId(partGroupId)
+ .transactionId(txId)
+ .scanId(scanId)
+ .indexToUse(indexId)
+ .exactKey(exactKey)
+ .lowerBound(lowerBound)
+ .upperBound(upperBound)
+ .flags(flags)
+ .columnsToInclude(columnsToInclude)
+ .batchSize(batchSize)
+ .timestamp(clock.now())
Review Comment:
Why we should pass the clock here? Seems it should work just with 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]