diff options
author | Allison Easton <allison.easton@mongodb.com> | 2023-02-08 14:29:43 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-08 17:20:15 +0000 |
commit | f82b5264e904a673abba83000824028744aab8b3 (patch) | |
tree | b6f62f43ab11e98f89a1a33de52a7e1eee738917 /src/mongo/db/s/sharding_ddl_util.cpp | |
parent | f2a95d46b1d5ba667048a937fd73de43c391f569 (diff) | |
download | mongo-f82b5264e904a673abba83000824028744aab8b3.tar.gz |
SERVER-73433 Clear index cache as well as collection cache after ddl operations
Diffstat (limited to 'src/mongo/db/s/sharding_ddl_util.cpp')
-rw-r--r-- | src/mongo/db/s/sharding_ddl_util.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/s/sharding_ddl_util.cpp b/src/mongo/db/s/sharding_ddl_util.cpp index f2b7480812a..5ce1ffe27a3 100644 --- a/src/mongo/db/s/sharding_ddl_util.cpp +++ b/src/mongo/db/s/sharding_ddl_util.cpp @@ -497,8 +497,10 @@ void removeCollAndChunksMetadataFromConfig(OperationContext* opCtx, const auto& nss = coll.getNss(); const auto& uuid = coll.getUuid(); - ON_BLOCK_EXIT( - [&] { Grid::get(opCtx)->catalogCache()->invalidateCollectionEntry_LINEARIZABLE(nss); }); + ON_BLOCK_EXIT([&] { + Grid::get(opCtx)->catalogCache()->invalidateCollectionEntry_LINEARIZABLE(nss); + Grid::get(opCtx)->catalogCache()->invalidateIndexEntry_LINEARIZABLE(nss); + }); deleteCollection(opCtx, nss, uuid, writeConcern); |