diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2021-05-11 14:30:26 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-20 19:18:53 +0000 |
commit | 11de948b0c50df7d12de09ae0f01e791fc5d70d7 (patch) | |
tree | 5a5a89cce0dc94f21778725184f8da3d5f76a13b /src/mongo/dbtests/query_stage_ixscan.cpp | |
parent | b2802257c7cd2cf253847d67da5ddcc780a5b85f (diff) | |
download | mongo-11de948b0c50df7d12de09ae0f01e791fc5d70d7.tar.gz |
SERVER-56002 SERVER-56023 Store Collection metadata in the Collection and reply on the copy-on-write machinery to keep it in sync with the durable catalog.
All updates to the metadata needs to happen through the Collection, moved interfaces from the DurableCatalog to the Collection.
Removed back pointer to Collection in IndexCatalogEntryImpl, interfaces now correctly take a const or non-const Collection. This should make its iterface const-correct to avoid making bugs where the copy-on-write system for Collections are bypassed.
Multikey handle is special as it needs to happen without exclusive access to the Collection. Implemented isolation for the Collection metadata when multikey is changed. It handles multi-doc transactions and is only commited to the Collection instance after the write to the durable catalog successfully commits.
listCollections and listIndexes can now safetly read the metadata cache without needing to read from the durable catalog making them safe to do without Collection level locks.
Diffstat (limited to 'src/mongo/dbtests/query_stage_ixscan.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_ixscan.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/dbtests/query_stage_ixscan.cpp b/src/mongo/dbtests/query_stage_ixscan.cpp index 4aa7462de72..b574b51ec84 100644 --- a/src/mongo/dbtests/query_stage_ixscan.cpp +++ b/src/mongo/dbtests/query_stage_ixscan.cpp @@ -63,6 +63,7 @@ public: ASSERT_OK(_coll->getIndexCatalog()->createIndexOnEmptyCollection( &_opCtx, + _coll, BSON("key" << BSON("x" << 1) << "name" << DBClientBase::genIndexName(BSON("x" << 1)) << "v" << static_cast<int>(kIndexVersion)))); |