summaryrefslogtreecommitdiff
path: root/client/distlock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/distlock.cpp')
-rw-r--r--client/distlock.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/distlock.cpp b/client/distlock.cpp
index 595fc38..73ee130 100644
--- a/client/distlock.cpp
+++ b/client/distlock.cpp
@@ -111,6 +111,9 @@ namespace mongo {
// replace it for a quite a while)
// if the lock is taken, the take-over mechanism should handle the situation
auto_ptr<DBClientCursor> c = conn->query( DistributedLock::locksNS , BSONObj() );
+ // TODO: Would be good to make clear whether query throws or returns empty on errors
+ uassert( 16060, str::stream() << "cannot query locks collection on config server " << conn.getHost(), c.get() );
+
set<string> pids;
while ( c->more() ) {
BSONObj lock = c->next();