diff options
author | Eric Milkie <milkie@10gen.com> | 2015-04-06 09:10:57 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2015-04-07 16:25:34 -0400 |
commit | 0f58d1037bcbfbf932e73e623772c4f815c361ad (patch) | |
tree | ae7ea2cf29830f0dc39e326142ddc1b6bc468804 /src/mongo/db/storage/oplog_hack.cpp | |
parent | 72543912dca4117e1deb45a56c599657a1bf747c (diff) | |
download | mongo-0f58d1037bcbfbf932e73e623772c4f815c361ad.tar.gz |
SERVER-17880 Rename OpTime to Timestamp
Diffstat (limited to 'src/mongo/db/storage/oplog_hack.cpp')
-rw-r--r-- | src/mongo/db/storage/oplog_hack.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/storage/oplog_hack.cpp b/src/mongo/db/storage/oplog_hack.cpp index 0bee74310f7..b25268e4271 100644 --- a/src/mongo/db/storage/oplog_hack.cpp +++ b/src/mongo/db/storage/oplog_hack.cpp @@ -34,7 +34,7 @@ #include <limits> #include "mongo/bson/bson_validate.h" -#include "mongo/bson/optime.h" +#include "mongo/bson/timestamp.h" #include "mongo/db/jsobj.h" #include "mongo/db/record_id.h" #include "mongo/util/debug_util.h" @@ -42,7 +42,7 @@ namespace mongo { namespace oploghack { - StatusWith<RecordId> keyForOptime(const OpTime& opTime) { + StatusWith<RecordId> keyForOptime(const Timestamp& opTime) { // Make sure secs and inc wouldn't be negative if treated as signed. This ensures that they // don't sort differently when put in a RecordId. It also avoids issues with Null/Invalid // RecordIds @@ -71,10 +71,10 @@ namespace oploghack { const BSONElement elem = obj["ts"]; if (elem.eoo()) return StatusWith<RecordId>(ErrorCodes::BadValue, "no ts field"); - if (elem.type() != Timestamp) + if (elem.type() != bsonTimestamp) return StatusWith<RecordId>(ErrorCodes::BadValue, "ts must be a Timestamp"); - return keyForOptime(elem._opTime()); + return keyForOptime(elem.timestamp()); } } // namespace oploghack |