ivanzlenko commented on code in PR #7086:
URL: https://github.com/apache/ignite-3/pull/7086#discussion_r2570734117
##########
modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildTask.java:
##########
@@ -265,15 +285,19 @@ private CompletableFuture<Void> handleNextBatch(@Nullable
RowId highestRowId) {
}
}
- private CompletableFuture<BatchToIndex> createBatchToIndex(@Nullable RowId
highestRowId) {
+ private CompletableFuture<Object>
sendBuildIndexReplicaRequest(BatchToIndex batch) {
+ return replicaService.invoke(node,
createBuildIndexReplicaRequest(batch, initialOperationTimestamp))
Review Comment:
What will happen if replica request will fail?
##########
modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildTask.java:
##########
@@ -265,15 +285,19 @@ private CompletableFuture<Void> handleNextBatch(@Nullable
RowId highestRowId) {
}
}
- private CompletableFuture<BatchToIndex> createBatchToIndex(@Nullable RowId
highestRowId) {
+ private CompletableFuture<Object>
sendBuildIndexReplicaRequest(BatchToIndex batch) {
+ return replicaService.invoke(node,
createBuildIndexReplicaRequest(batch, initialOperationTimestamp))
+ .whenComplete((ignored, e) ->
indexBuilderMetricSource.indexBuildFinished());
+ }
+
+ private List<RowId> getRowIds(@Nullable RowId highestRowId, Map<UUID,
CommitPartitionId> transactionsToResolve) {
Review Comment:
To be honest I would've leave createBatchToIndex in place, and made it a
single point of failure in calling method.
And done all necessary stuff inside createBatchToIndex
--
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]