summaryrefslogtreecommitdiff
path: root/src/mongo/db/signed_logical_time.h
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2017-04-04 15:03:13 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2017-04-18 12:20:52 -0400
commit36dee9cbf58710f4168d39104aa5d446b3f15d49 (patch)
tree24811f61594d25afe9e38d667a01cbb2becb66a2 /src/mongo/db/signed_logical_time.h
parent104653ec8eca6865ff938c3e9966139b2cdd340f (diff)
downloadmongo-36dee9cbf58710f4168d39104aa5d446b3f15d49.tar.gz
SERVER-28565 Do not return logicalTime on non-sharded RS
Diffstat (limited to 'src/mongo/db/signed_logical_time.h')
-rw-r--r--src/mongo/db/signed_logical_time.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/signed_logical_time.h b/src/mongo/db/signed_logical_time.h
index fde222efb39..caf7830fb32 100644
--- a/src/mongo/db/signed_logical_time.h
+++ b/src/mongo/db/signed_logical_time.h
@@ -44,6 +44,9 @@ public:
SignedLogicalTime() = default;
+ explicit SignedLogicalTime(LogicalTime time, long long keyId)
+ : _time(std::move(time)), _keyId(keyId) {}
+
explicit SignedLogicalTime(LogicalTime time, TimeProof proof, long long keyId)
: _time(std::move(time)), _proof(std::move(proof)), _keyId(keyId) {}
@@ -51,7 +54,7 @@ public:
return _time;
}
- const TimeProof& getProof() const {
+ boost::optional<TimeProof> getProof() const {
return _proof;
}
@@ -65,7 +68,7 @@ public:
private:
LogicalTime _time;
- TimeProof _proof;
+ boost::optional<TimeProof> _proof;
long long _keyId{0};
};