diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-08-20 18:42:03 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-08-27 16:01:16 -0400 |
commit | 524976c358b7a5d791973dceb91cffb64b14f22e (patch) | |
tree | cb3606c1bd7dea6278b554dad1ba9a6d43c75c88 /src/mongo/db/repl/optime.cpp | |
parent | a22d9007497151eaf4dfc510dbdfeebc5d735f4c (diff) | |
download | mongo-524976c358b7a5d791973dceb91cffb64b14f22e.tar.gz |
SERVER-19765 Rename term constants.
Diffstat (limited to 'src/mongo/db/repl/optime.cpp')
-rw-r--r-- | src/mongo/db/repl/optime.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/repl/optime.cpp b/src/mongo/db/repl/optime.cpp index 31d83d91e4f..172302b42c1 100644 --- a/src/mongo/db/repl/optime.cpp +++ b/src/mongo/db/repl/optime.cpp @@ -66,7 +66,7 @@ void OpTime::append(BSONObjBuilder* builder) const { builder->append(kTimestampFieldName, _timestamp); // Don't add term in protocol version 0. - if (_term != kProtocolVersionV0Term) { + if (_term != kUninitializedTerm) { builder->append(kTermFieldName, _term); } } @@ -79,7 +79,7 @@ StatusWith<OpTime> OpTime::parseFromBSON(const BSONObj& obj) { // Default to -1 if the term is absent. long long term; - status = bsonExtractIntegerFieldWithDefault(obj, kTermFieldName, kProtocolVersionV0Term, &term); + status = bsonExtractIntegerFieldWithDefault(obj, kTermFieldName, kUninitializedTerm, &term); if (!status.isOK()) return status; |