This is an automated email from the ASF dual-hosted git repository. rpuch pushed a commit to branch ignite-27349 in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit 3e0c5da0af18d1e118721603504617ac08e6d33b Author: Roman Puchkovskiy <[email protected]> AuthorDate: Fri Dec 19 18:33:06 2025 +0400 IGNITE-27349 / add comments --- .../main/java/org/apache/ignite/internal/index/IndexBuildTask.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildTask.java b/modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildTask.java index 776f80051f6..0b64a024256 100644 --- a/modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildTask.java +++ b/modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildTask.java @@ -189,7 +189,13 @@ class IndexBuildTask { } try { + // Before starting to build the index, we are waiting for all operations of RW transactions that started before index creation + // to make sure that, even if some coordinator has gone while we were waiting for its pre-index RW transactions to finish, + // we still allow operations of those transactions from that coordinator which are still in-flight to finish, so that we + // index the row versions they could create. Otherwise, we might miss some row versions in the index. txRwOperationTracker.awaitCompleteTxRwOperations(indexCreationInfo.catalogVersion()) + // This wait is necessary to make sure that all writes made before the index has switched to the BUILDING state + // are visible to the index build process. .thenCompose(unused -> safeTime.waitFor(indexBuildingStateActivationTimestamp)) .thenRun(statisticsLoggingListener::onIndexBuildStarted) .thenApplyAsync(unused -> partitionStorage.highestRowId(), executor)
