diff options
author | Sophia Tan <sophia_tll@hotmail.com> | 2022-02-04 18:20:33 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-04 19:11:38 +0000 |
commit | 308aae84060ff93471b3170841650a38baaaf35d (patch) | |
tree | 57ca8a137a4a9575fc4ff2169da7d5b8a22efbe7 /src/mongo/db/views | |
parent | a3b36dabe82aea53d2d16d82cd20f95d19e67932 (diff) | |
download | mongo-308aae84060ff93471b3170841650a38baaaf35d.tar.gz |
SERVER-63137 Change CollectionCatalog::_views to be keyed by TenantDatabaseName
Diffstat (limited to 'src/mongo/db/views')
-rw-r--r-- | src/mongo/db/views/view_catalog.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/views/view_catalog.cpp b/src/mongo/db/views/view_catalog.cpp index 1e49e7abd92..85a5986fd13 100644 --- a/src/mongo/db/views/view_catalog.cpp +++ b/src/mongo/db/views/view_catalog.cpp @@ -282,7 +282,9 @@ Status ViewCatalog::_reload(OperationContext* opCtx, CollectionCatalog::write( opCtx, [&dbName, viewsForDb = std::move(viewNamesForDb)](CollectionCatalog& catalog) { - catalog.replaceViewsForDatabase(dbName, std::move(viewsForDb)); + // TODO SERVER-63206: Use instead TenantDatabaseName passed in by caller. + catalog.replaceViewsForDatabase(TenantDatabaseName(boost::none, dbName), + std::move(viewsForDb)); }); } } catch (const DBException& ex) { @@ -318,8 +320,9 @@ void ViewCatalog::clear(OperationContext* opCtx, StringData dbName) { vfdb.valid = true; vfdb.viewGraphNeedsRefresh = false; vfdb.stats = {}; + // TODO SERVER-63206: Use instead TenantDatabaseName passed in by caller. CollectionCatalog::write(opCtx, [db = dbName.toString()](CollectionCatalog& catalog) { - catalog.replaceViewsForDatabase(db, {}); + catalog.replaceViewsForDatabase(TenantDatabaseName(boost::none, db), {}); }); catalog.commit(); } |