diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2019-02-05 11:43:52 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2019-02-11 12:13:38 -0500 |
commit | d568e329a67eee8ba241d52067750a3d8c42dc0f (patch) | |
tree | e8180ccc44f243f603cb91eaed431afeeabe8676 /src/mongo/db/views | |
parent | b54d9905a167867a2655910799573378aff2ce89 (diff) | |
download | mongo-d568e329a67eee8ba241d52067750a3d8c42dc0f.tar.gz |
SERVER-37283 Use stronger locks for system.views
Readers of the view catalog depend on a MODE_IS DB lock preventing
concurrent writes to the view catalog. This is true for regular view
maintenance commands like collMod, create, and drop. However, on
secondaries these commands are replicated as direct writes to
system.views and do not hold as strong of a lock. Further, a user is
permitted to write directly to system.views and so could hit a similar
issue on the primary.
Diffstat (limited to 'src/mongo/db/views')
-rw-r--r-- | src/mongo/db/views/view_catalog.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/mongo/db/views/view_catalog.cpp b/src/mongo/db/views/view_catalog.cpp index 67aa5b27cab..e9763fc488d 100644 --- a/src/mongo/db/views/view_catalog.cpp +++ b/src/mongo/db/views/view_catalog.cpp @@ -60,7 +60,6 @@ namespace mongo { namespace { -MONGO_FAIL_POINT_DEFINE(hangDuringViewResolution); StatusWith<std::unique_ptr<CollatorInterface>> parseCollator(OperationContext* opCtx, BSONObj collationSpec) { @@ -460,13 +459,6 @@ StatusWith<ResolvedView> ViewCatalog::resolveView(OperationContext* opCtx, int depth = 0; for (; depth < ViewGraph::kMaxViewDepth; depth++) { - while (MONGO_FAIL_POINT(hangDuringViewResolution)) { - log() << "Yielding mutex and hanging due to 'hangDuringViewResolution' failpoint"; - lock.unlock(); - sleepmillis(1000); - lock.lock(); - } - // If the catalog has been invalidated, bail and restart. if (!_valid.load()) { uassertStatusOK(_reloadIfNeeded(lock, opCtx)); |