summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl_index_build_state.h
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2019-06-03 12:53:23 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-06-03 12:53:23 -0400
commit152605e55b53be70d73694f29f32dd3dbd70a5e1 (patch)
treef6d62bc159e970855b5e2ca5d2397cb695f885f1 /src/mongo/db/repl_index_build_state.h
parent04806cf67c2d2d738b996183eb2c733e23b2afae (diff)
downloadmongo-152605e55b53be70d73694f29f32dd3dbd70a5e1.tar.gz
SERVER-41445 Remove anonymous namespace from `repl_index_build_state.h`.
This is an ODR violation. Fixed.
Diffstat (limited to 'src/mongo/db/repl_index_build_state.h')
-rw-r--r--src/mongo/db/repl_index_build_state.h34
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