diff options
author | Samy Lanka <samy.lanka@mongodb.com> | 2020-06-24 23:47:16 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-08 02:57:59 +0000 |
commit | 5e3c06a9a7ed5ccb9ea3e352111ad3f3b6ce0376 (patch) | |
tree | 2b3ddcfa3d35ce5425ca6abbcb9b769e4548366b /src/mongo/db/index_builds_coordinator.h | |
parent | 58ffffed3212fd7e68099f4c0c9c256303a9fde3 (diff) | |
download | mongo-5e3c06a9a7ed5ccb9ea3e352111ad3f3b6ce0376.tar.gz |
SERVER-48476 Use majority read cursor for collection scan in resumable index builds
Diffstat (limited to 'src/mongo/db/index_builds_coordinator.h')
-rw-r--r-- | src/mongo/db/index_builds_coordinator.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/index_builds_coordinator.h b/src/mongo/db/index_builds_coordinator.h index bff85de65a1..56df844a0e5 100644 --- a/src/mongo/db/index_builds_coordinator.h +++ b/src/mongo/db/index_builds_coordinator.h @@ -589,6 +589,14 @@ protected: Collection* collection); /** + * Waits for the last optime before the interceptors were installed on the node to be majority + * committed and sets that the collection scan for the index build should use a majority read + * cursor. If no such optime was recorded, it will do nothing. + */ + void _awaitLastOpTimeBeforeInterceptorsMajorityCommitted( + OperationContext* opCtx, std::shared_ptr<ReplIndexBuildState> replState); + + /** * Modularizes the _indexBuildsManager calls part of _runIndexBuildInner. Throws on error. */ void _buildIndex(OperationContext* opCtx, |