summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2016-03-24 16:10:22 -0400
committerRandolph Tan <randolph@10gen.com>2016-03-28 15:43:08 -0400
commit26603490725d969247044de4f36f487972264023 (patch)
tree8ced88f4c6a18814ab940917acc37126bf4ec1fc
parent1114d85ae5437eb7fdfb729979a78acd0659fe55 (diff)
downloadmongo-26603490725d969247044de4f36f487972264023.tar.gz
SERVER-23283 RangeDeleter does not log cursor ids correctly in deleteNow()
-rw-r--r--src/mongo/db/range_deleter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/range_deleter.cpp b/src/mongo/db/range_deleter.cpp
index 768cbd791b8..22172c0bf35 100644
--- a/src/mongo/db/range_deleter.cpp
+++ b/src/mongo/db/range_deleter.cpp
@@ -306,30 +306,30 @@ bool RangeDeleter::deleteNow(OperationContext* txn,
_deletesInProgress++;
}
- set<CursorId> cursorsToWait;
+ RangeDeleteEntry taskDetails(options);
if (options.waitForOpenCursors) {
- _env->getCursorIds(txn, ns, &cursorsToWait);
+ _env->getCursorIds(txn, ns, &taskDetails.cursorsToWait);
}
long long checkIntervalMillis = 5;
- RangeDeleteEntry taskDetails(options);
+
taskDetails.stats.queueStartTS = jsTime();
- for (; !cursorsToWait.empty(); sleepmillis(checkIntervalMillis)) {
+ for (; !taskDetails.cursorsToWait.empty(); sleepmillis(checkIntervalMillis)) {
logCursorsWaiting(&taskDetails);
set<CursorId> cursorsNow;
_env->getCursorIds(txn, ns, &cursorsNow);
set<CursorId> cursorsLeft;
- std::set_intersection(cursorsToWait.begin(),
- cursorsToWait.end(),
+ std::set_intersection(taskDetails.cursorsToWait.begin(),
+ taskDetails.cursorsToWait.end(),
cursorsNow.begin(),
cursorsNow.end(),
std::inserter(cursorsLeft, cursorsLeft.end()));
- cursorsToWait.swap(cursorsLeft);
+ taskDetails.cursorsToWait.swap(cursorsLeft);
if (stopRequested()) {
*errMsg = "deleter was stopped.";