summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/optime.cpp
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2015-09-29 06:48:44 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2015-09-30 11:30:24 -0400
commitc1547dacbf3f4e70aa7fda94f9a9e71f5119e1d0 (patch)
treea8b6fcb5f689ce08d1842e96cafa77a1d9ebba19 /src/mongo/db/repl/optime.cpp
parent257845475d4fb578a98e428260d889f0876f7e35 (diff)
downloadmongo-c1547dacbf3f4e70aa7fda94f9a9e71f5119e1d0.tar.gz
SERVER-20684 change OpTime's default constructor set term = -1 to make it the true minimum OpTime
Diffstat (limited to 'src/mongo/db/repl/optime.cpp')
-rw-r--r--src/mongo/db/repl/optime.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/repl/optime.cpp b/src/mongo/db/repl/optime.cpp
index 53474c9ba60..8cf08a0afd7 100644
--- a/src/mongo/db/repl/optime.cpp
+++ b/src/mongo/db/repl/optime.cpp
@@ -41,6 +41,8 @@ namespace repl {
const char OpTime::kTimestampFieldName[] = "ts";
const char OpTime::kTermFieldName[] = "t";
+OpTime::OpTime() : _timestamp(Timestamp(0, 0)), _term(OpTime::kUninitializedTerm) {}
+
OpTime::OpTime(Timestamp ts, long long term) : _timestamp(std::move(ts)), _term(term) {}
Timestamp OpTime::getTimestamp() const {