From 2b7b105b3c26bc779d30d3c7ec4b93a0115569a8 Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Tue, 7 Oct 2014 12:00:20 -0400 Subject: SERVER-14668 Change read paths to acquire IS lock on the DB instead of S Also change respective assertions, which are checking for S-lock on the database. --- src/mongo/db/concurrency/d_concurrency.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/concurrency/d_concurrency.cpp') diff --git a/src/mongo/db/concurrency/d_concurrency.cpp b/src/mongo/db/concurrency/d_concurrency.cpp index bdd78c68f83..1e33f5246e7 100644 --- a/src/mongo/db/concurrency/d_concurrency.cpp +++ b/src/mongo/db/concurrency/d_concurrency.cpp @@ -259,11 +259,11 @@ namespace mongo { _lockState->lockGlobal(isRead ? newlm::MODE_IS : newlm::MODE_IX); - if (supportsDocLocking()) { + if (supportsDocLocking() || isRead) { _lockState->lock(_id, _mode); } else { - _lockState->lock(_id, isRead ? newlm::MODE_S : newlm::MODE_X); + _lockState->lock(_id, newlm::MODE_X); } resetTime(); -- cgit v1.2.1