summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@10gen.com>2016-11-15 09:57:50 -0500
committerDaniel Gottlieb <daniel.gottlieb@10gen.com>2016-11-15 14:08:31 -0500
commit549c3f4315fd95431a662e7a8eff880f00b1458d (patch)
tree36559b43620091b7bc4e7f2de13018c533ac95ac
parent39d650faa5436a37359ca45717d5e988fb4461cb (diff)
downloadmongo-549c3f4315fd95431a662e7a8eff880f00b1458d.tar.gz
SERVER-26775: Cursors may be on a view namespace.
When a ClientCursorMonitor is timing out a cursor, its namespace may be on a view. One case where this can happen is when the cursor was on a collection, but when the ClientCursorMonitor gets to timing it out, that collection was dropped and its namespace was recreated as a view.
-rw-r--r--src/mongo/db/catalog/cursor_manager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/cursor_manager.cpp b/src/mongo/db/catalog/cursor_manager.cpp
index 24b732d234f..206128ced88 100644
--- a/src/mongo/db/catalog/cursor_manager.cpp
+++ b/src/mongo/db/catalog/cursor_manager.cpp
@@ -265,7 +265,7 @@ std::size_t GlobalCursorIdCache::timeoutCursors(OperationContext* txn, int milli
for (unsigned i = 0; i < todo.size(); i++) {
const std::string& ns = todo[i];
- AutoGetCollectionForRead ctx(txn, ns);
+ AutoGetCollectionOrViewForRead ctx(txn, ns);
if (!ctx.getDb()) {
continue;
}