diff options
Diffstat (limited to 'src/mongo/db/multi_key_path_tracker.h')
-rw-r--r-- | src/mongo/db/multi_key_path_tracker.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/multi_key_path_tracker.h b/src/mongo/db/multi_key_path_tracker.h index 3f1d4800bab..02034aae6cd 100644 --- a/src/mongo/db/multi_key_path_tracker.h +++ b/src/mongo/db/multi_key_path_tracker.h @@ -30,6 +30,8 @@ #include <string> +#include <boost/optional.hpp> + #include "mongo/db/index/multikey_paths.h" #include "mongo/db/operation_context.h" @@ -53,6 +55,8 @@ class MultikeyPathTracker { public: static const OperationContext::Decoration<MultikeyPathTracker> get; + static void mergeMultikeyPaths(MultikeyPaths* toMergeInto, const MultikeyPaths& newPaths); + // Decoration requires a default constructor. MultikeyPathTracker() = default; @@ -69,6 +73,12 @@ public: const WorkerMultikeyPathInfo& getMultikeyPathInfo() const; /** + * Returns the multikey path information for the given inputs, or boost::none if none exist. + */ + const boost::optional<MultikeyPaths> getMultikeyPathInfo(const NamespaceString& nss, + const std::string& indexName); + + /** * Specifies that we should track multikey path information on this MultikeyPathTracker. This is * only expected to be called during oplog application on secondaries. We cannot simply check * 'canAcceptWritesFor' because background index builds use their own OperationContext and |