summaryrefslogtreecommitdiff
path: root/src/mongo/db/range_deleter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/range_deleter.cpp')
-rw-r--r--src/mongo/db/range_deleter.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mongo/db/range_deleter.cpp b/src/mongo/db/range_deleter.cpp
index fd90b65c289..90cce2fcb4c 100644
--- a/src/mongo/db/range_deleter.cpp
+++ b/src/mongo/db/range_deleter.cpp
@@ -232,7 +232,10 @@ namespace mongo {
_stats->incPendingDeletes_inlock();
}
- _env->getCursorIds(ns, &toDelete->cursorsToWait);
+ {
+ boost::scoped_ptr<OperationContext> txn(transactionFactory());
+ _env->getCursorIds(txn.get(), ns, &toDelete->cursorsToWait);
+ }
{
scoped_lock sl(_queueMutex);
@@ -284,7 +287,7 @@ namespace mongo {
}
set<CursorId> cursorsToWait;
- _env->getCursorIds(ns, &cursorsToWait);
+ _env->getCursorIds(txn, ns, &cursorsToWait);
long long checkIntervalMillis = 5;
@@ -295,7 +298,7 @@ namespace mongo {
while (!cursorsToWait.empty()) {
set<CursorId> cursorsNow;
- _env->getCursorIds(ns, &cursorsNow);
+ _env->getCursorIds(txn, ns, &cursorsNow);
set<CursorId> cursorsLeft;
std::set_intersection(cursorsToWait.begin(),
@@ -438,7 +441,11 @@ namespace mongo {
RangeDeleteEntry* entry = *iter;
set<CursorId> cursorsNow;
- _env->getCursorIds(entry->ns, &cursorsNow);
+ {
+ boost::scoped_ptr<OperationContext> txn(
+ entry->transactionFactory()); // XXX?
+ _env->getCursorIds(txn.get(), entry->ns, &cursorsNow);
+ }
set<CursorId> cursorsLeft;
std::set_intersection(entry->cursorsToWait.begin(),