summaryrefslogtreecommitdiff
path: root/src/mongo/db/vector_clock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/vector_clock.cpp')
-rw-r--r--src/mongo/db/vector_clock.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/vector_clock.cpp b/src/mongo/db/vector_clock.cpp
index 2168c852c33..c8f730cf39f 100644
--- a/src/mongo/db/vector_clock.cpp
+++ b/src/mongo/db/vector_clock.cpp
@@ -36,6 +36,8 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/logical_clock_gen.h"
#include "mongo/db/logical_time_validator.h"
+#include "mongo/db/vector_clock_document_gen.h"
+#include "mongo/util/static_immortal.h"
namespace mongo {
@@ -404,4 +406,9 @@ void VectorClock::advanceTime_forTest(Component component, LogicalTime newTime)
_advanceTime(std::move(newTimeArray));
}
+const Query& VectorClock::stateQuery() {
+ static StaticImmortal q{QUERY(VectorClockDocument::k_idFieldName << kDocIdKey)};
+ return *q;
+}
+
} // namespace mongo