diff options
author | Marcos José Grillo Ramirez <marcos.grillo@mongodb.com> | 2023-01-23 18:34:28 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-23 19:56:05 +0000 |
commit | e4fff3e1fe7b31b25cedde7b05205325b47b4a7d (patch) | |
tree | 23158e1330f2c5ad16451058b7f9c249ca40c6cb /src/mongo/s/index_version.h | |
parent | 165e05b4a8877d294cf369462df77fe6813785c4 (diff) | |
download | mongo-e4fff3e1fe7b31b25cedde7b05205325b47b4a7d.tar.gz |
SERVER-70795 Add sharding index catalog operations to rename collection
Diffstat (limited to 'src/mongo/s/index_version.h')
-rw-r--r-- | src/mongo/s/index_version.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/s/index_version.h b/src/mongo/s/index_version.h index 8f135bb8574..df4bb48c6ef 100644 --- a/src/mongo/s/index_version.h +++ b/src/mongo/s/index_version.h @@ -42,6 +42,8 @@ public: CollectionIndexes(UUID collectionUUID, Timestamp index) : _uuid(collectionUUID), _indexVersion(index) {} + CollectionIndexes() : CollectionIndexes(UUID::gen(), Timestamp()) {} + Timestamp indexVersion() const { return _indexVersion; } @@ -58,6 +60,9 @@ public: return !(otherVersion == *this); } + static CollectionIndexes parse(const BSONElement& element); + void serialize(StringData field, BSONObjBuilder* builder) const; + std::string toString() const; BSONObj toBSONForLogging() const; |