diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-06-03 12:53:23 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-06-03 12:53:23 -0400 |
commit | 152605e55b53be70d73694f29f32dd3dbd70a5e1 (patch) | |
tree | f6d62bc159e970855b5e2ca5d2397cb695f885f1 | |
parent | 04806cf67c2d2d738b996183eb2c733e23b2afae (diff) | |
download | mongo-152605e55b53be70d73694f29f32dd3dbd70a5e1.tar.gz |
SERVER-41445 Remove anonymous namespace from `repl_index_build_state.h`.
This is an ODR violation. Fixed.
-rw-r--r-- | src/mongo/db/repl_index_build_state.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/mongo/db/repl_index_build_state.h b/src/mongo/db/repl_index_build_state.h index 151f6ade81f..9b44ee9e75a 100644 --- a/src/mongo/db/repl_index_build_state.h +++ b/src/mongo/db/repl_index_build_state.h @@ -46,24 +46,6 @@ namespace mongo { -namespace { - -std::vector<std::string> extractIndexNames(const std::vector<BSONObj>& specs) { - std::vector<std::string> indexNames; - for (const auto& spec : specs) { - std::string name = spec.getStringField(IndexDescriptor::kIndexNameFieldName); - invariant(!name.empty(), - str::stream() << "Bad spec passed into ReplIndexBuildState constructor, missing '" - << IndexDescriptor::kIndexNameFieldName - << "' field: " - << spec); - indexNames.push_back(name); - } - return indexNames; -} - -} // namespace - /** * Tracks the cross replica set progress of a particular index build identified by a build UUID. * @@ -140,6 +122,22 @@ struct ReplIndexBuildState { // The coordinator for the index build will wait upon this when awaiting an external signal, // such as commit or commit readiness signals. stdx::condition_variable condVar; + +private: + std::vector<std::string> extractIndexNames(const std::vector<BSONObj>& specs) { + std::vector<std::string> indexNames; + for (const auto& spec : specs) { + std::string name = spec.getStringField(IndexDescriptor::kIndexNameFieldName); + invariant(!name.empty(), + str::stream() + << "Bad spec passed into ReplIndexBuildState constructor, missing '" + << IndexDescriptor::kIndexNameFieldName + << "' field: " + << spec); + indexNames.push_back(name); + } + return indexNames; + } }; } // namespace mongo |