summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Jin Kang Park <yujin.kang@mongodb.com>2022-03-14 14:30:51 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-14 15:44:39 +0000
commit237b218974e4fc09104c81fe0bb1ba83688d8035 (patch)
tree8aaca4396e694e92c69cfd7f7af27420fc1dbcb7
parente1ab3976f52497cb516b95c752eb81d4a69e3bbf (diff)
downloadmongo-237b218974e4fc09104c81fe0bb1ba83688d8035.tar.gz
SERVER-63684: Rollback SERVER-62101, changes not required after SERVER-57250
-rw-r--r--src/mongo/db/commands/run_aggregate.cpp7
-rw-r--r--src/mongo/db/views/SConscript1
-rw-r--r--src/mongo/db/views/view_catalog_helpers.cpp4
3 files changed, 2 insertions, 10 deletions
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp
index 75368eb49bb..49e79a51b59 100644
--- a/src/mongo/db/commands/run_aggregate.cpp
+++ b/src/mongo/db/commands/run_aggregate.cpp
@@ -826,13 +826,6 @@ Status runAggregate(OperationContext* opCtx,
auto timeSeriesCollator =
ctx->getView()->timeseries() ? request.getCollation() : boost::none;
- // Check that the database still exists, in case this is a lock-free
- // operation. It's possible for a view to disappear after we release locks below, so
- // it's safe to quit early if the view disappears while running lock-free.
- const TenantDatabaseName tenantDbName(boost::none, nss.db());
- uassert(ErrorCodes::NamespaceNotFound,
- str::stream() << "Namespace '" << nss << "' no longer exists",
- DatabaseHolder::get(opCtx)->dbExists(opCtx, tenantDbName));
auto resolvedView = uassertStatusOK(
view_catalog_helpers::resolveView(opCtx, catalog, nss, timeSeriesCollator));
diff --git a/src/mongo/db/views/SConscript b/src/mongo/db/views/SConscript
index 62fb715de39..a16bf79890a 100644
--- a/src/mongo/db/views/SConscript
+++ b/src/mongo/db/views/SConscript
@@ -37,6 +37,7 @@ env.Library(
'view_catalog_helpers.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/db/catalog/collection',
'$BUILD_DIR/mongo/db/pipeline/aggregation',
'resolved_view',
'views',
diff --git a/src/mongo/db/views/view_catalog_helpers.cpp b/src/mongo/db/views/view_catalog_helpers.cpp
index a253f16adc3..018fad8437d 100644
--- a/src/mongo/db/views/view_catalog_helpers.cpp
+++ b/src/mongo/db/views/view_catalog_helpers.cpp
@@ -185,9 +185,7 @@ StatusWith<ResolvedView> resolveView(OperationContext* opCtx,
}
if (view->timeseries()) {
- // Use the lock-free collection lookup, to ensure compatibility with lock-free read
- // operations.
- auto tsCollection = catalog->lookupCollectionByNamespaceForRead(opCtx, *resolvedNss);
+ auto tsCollection = catalog->lookupCollectionByNamespace(opCtx, *resolvedNss);
uassert(6067201,
str::stream() << "expected time-series buckets collection " << *resolvedNss
<< " to exist",