diff options
author | Benety Goh <benety@mongodb.com> | 2022-05-16 09:42:28 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-16 14:30:56 +0000 |
commit | 04402176f1ae8471396905b419ebb3d1b7d1c7a9 (patch) | |
tree | 8de153a598a9a1b8372e70ad0f4939ad88ffa820 /src/mongo/db/repl_index_build_state.cpp | |
parent | 59bec6ec49ecf623c70ef5fe78e3e9ad969bc160 (diff) | |
download | mongo-04402176f1ae8471396905b419ebb3d1b7d1c7a9.tar.gz |
SERVER-60791 add appendBuildInfo() method to IndexBuildsCoordinator and index build class hierarchy for listIndexes includeIncludeBuildInfo
Contains no functional or formatting changes to listIndexes.
Diffstat (limited to 'src/mongo/db/repl_index_build_state.cpp')
-rw-r--r-- | src/mongo/db/repl_index_build_state.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/repl_index_build_state.cpp b/src/mongo/db/repl_index_build_state.cpp index 3b84477aac3..773608aafbb 100644 --- a/src/mongo/db/repl_index_build_state.cpp +++ b/src/mongo/db/repl_index_build_state.cpp @@ -117,6 +117,8 @@ void IndexBuildState::setState(StateFlag state, } } +void IndexBuildState::appendBuildInfo(BSONObjBuilder* builder) const {} + ReplIndexBuildState::ReplIndexBuildState(const UUID& indexBuildUUID, const UUID& collUUID, const std::string& dbName, @@ -462,6 +464,12 @@ void ReplIndexBuildState::clearLastOpTimeBeforeInterceptors() { _lastOpTimeBeforeInterceptors = {}; } +void ReplIndexBuildState::appendBuildInfo(BSONObjBuilder* builder) const { + stdx::unique_lock<Latch> lk(_mutex); + + _indexBuildState.appendBuildInfo(builder); +} + bool ReplIndexBuildState::_shouldSkipIndexBuildStateTransitionCheck(OperationContext* opCtx) const { const auto replCoord = repl::ReplicationCoordinator::get(opCtx); if (replCoord->isReplEnabled() && protocol == IndexBuildProtocol::kTwoPhase) { |