tkalkirill commented on code in PR #3299:
URL: https://github.com/apache/ignite-3/pull/3299#discussion_r1504360502
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -1257,18 +1275,29 @@ private CompletableFuture<List<BinaryRow>>
scanSortedIndex(
flags
))).cursor();
+ int batchCount = request.batchSize();
+
var result = new ArrayList<BinaryRow>(batchCount);
- return continueReadOnlyIndexScan(schemaAwareIndexStorage, cursor,
timestamp, batchCount, result)
- .thenApply(ignore -> closeCursorIfBatchNotFull(result,
batchCount, cursorId));
+ HybridTimestamp readTimestamp = request.readTimestamp();
+
+ return continueReadOnlyIndexScan(
+ schemaAwareIndexStorage,
+ cursor,
+ readTimestamp,
+ batchCount,
+ result,
+ schemaVersionByTs(readTimestamp)
+ ).thenApply(ignore -> closeCursorIfBatchNotFull(result, batchCount,
cursorId));
}
private CompletableFuture<Void> continueReadOnlyIndexScan(
TableSchemaAwareIndexStorage schemaAwareIndexStorage,
Cursor<IndexRow> cursor,
- HybridTimestamp timestamp,
+ HybridTimestamp readTimestamp,
int batchSize,
- List<BinaryRow> result
+ List<BinaryRow> result,
+ int schemaVersion
Review Comment:
apply it
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -1308,7 +1338,8 @@ private CompletableFuture<Void> continueIndexScan(
Cursor<IndexRow> indexCursor,
int batchSize,
List<BinaryRow> result,
- Predicate<IndexRow> isUpperBoundAchieved
+ Predicate<IndexRow> isUpperBoundAchieved,
+ int schemaVersion
Review Comment:
apply it
--
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]