diff options
author | Haley Connelly <haley.connelly@mongodb.com> | 2022-09-19 15:07:32 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-19 16:42:51 +0000 |
commit | bbfaa9d5ddd2eb3c6337a4d50bac0c853c9e3948 (patch) | |
tree | d938f482e60e869fc4838d593b53142164769e29 /src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | |
parent | c9fe899fff347770c0e30fa0272f6157be6676a8 (diff) | |
download | mongo-bbfaa9d5ddd2eb3c6337a4d50bac0c853c9e3948.tar.gz |
SERVER-67290 Support repair on clustered collections with missing _mdb_catalog
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index ad8a9265ca1..a4909b310a7 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -2655,4 +2655,11 @@ StatusWith<BSONObj> WiredTigerKVEngine::getStorageMetadata(StringData ident) con << fileMetadata.getValue()); } +KeyFormat WiredTigerKVEngine::getKeyFormat(OperationContext* opCtx, StringData ident) const { + + const std::string wtTableConfig = + uassertStatusOK(WiredTigerUtil::getMetadataCreate(opCtx, "table:{}"_format(ident))); + return wtTableConfig.find("key_format=u") != string::npos ? KeyFormat::String : KeyFormat::Long; +} + } // namespace mongo |