diff options
author | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2018-02-28 21:01:49 -0500 |
---|---|---|
committer | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2018-02-28 21:01:49 -0500 |
commit | 82d0934425e83acfcb9c3b65a4fc52994ae58351 (patch) | |
tree | b2080960e360eb6fd9163e966dc0ffea19b7d32b /src/mongo/db/multi_key_path_tracker.h | |
parent | 9960da7396adf3a92ac22e3c0fc62be1bc54be91 (diff) | |
download | mongo-82d0934425e83acfcb9c3b65a4fc52994ae58351.tar.gz |
SERVER-33503: Complete timestamping multikey updates for background index builds.
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 |