diff options
Diffstat (limited to 'src/mongo/s/catalog/type_chunk.cpp')
-rw-r--r-- | src/mongo/s/catalog/type_chunk.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mongo/s/catalog/type_chunk.cpp b/src/mongo/s/catalog/type_chunk.cpp index 8ce3d377491..7ed4cc739cc 100644 --- a/src/mongo/s/catalog/type_chunk.cpp +++ b/src/mongo/s/catalog/type_chunk.cpp @@ -27,13 +27,8 @@ * it in the license file. */ - -#include "mongo/platform/basic.h" - #include "mongo/s/catalog/type_chunk.h" -#include <cstring> - #include "mongo/base/status_with.h" #include "mongo/bson/bsonobj.h" #include "mongo/bson/bsonobjbuilder.h" @@ -46,7 +41,6 @@ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding - namespace mongo { const NamespaceString ChunkType::ConfigNS("config.chunks"); @@ -296,7 +290,7 @@ StatusWith<ChunkType> ChunkType::parseFromConfigBSON(const BSONObj& source, if (versionElem.type() == bsonTimestamp || versionElem.type() == Date) { auto chunkLastmod = Timestamp(versionElem._numberLong()); chunk._version = - ChunkVersion(chunkLastmod.getSecs(), chunkLastmod.getInc(), epoch, timestamp); + ChunkVersion({epoch, timestamp}, {chunkLastmod.getSecs(), chunkLastmod.getInc()}); } else { return {ErrorCodes::BadValue, str::stream() << "The field " << ChunkType::lastmod() << " cannot be parsed."}; @@ -381,7 +375,7 @@ StatusWith<ChunkType> ChunkType::parseFromShardBSON(const BSONObj& source, if (lastmodElem.type() == bsonTimestamp || lastmodElem.type() == Date) { auto chunkLastmod = Timestamp(lastmodElem._numberLong()); chunk._version = - ChunkVersion(chunkLastmod.getSecs(), chunkLastmod.getInc(), epoch, timestamp); + ChunkVersion({epoch, timestamp}, {chunkLastmod.getSecs(), chunkLastmod.getInc()}); } else { return {ErrorCodes::NoSuchKey, str::stream() << "Expected field " << ChunkType::lastmod() << " not found."}; |