diff options
author | Randolph Tan <randolph@10gen.com> | 2016-03-24 16:10:22 -0400 |
---|---|---|
committer | Ramon Fernandez <ramon@mongodb.com> | 2016-03-28 16:55:22 -0400 |
commit | 5a3b985bb4a26ba09a324bc2eed168613b70999c (patch) | |
tree | fe3a9ba4f09c8cc1520571f97c1f96cf814a5ad7 | |
parent | 1e0512f8453d103987f5fbfb87b71e9a131c2a60 (diff) | |
download | mongo-5a3b985bb4a26ba09a324bc2eed168613b70999c.tar.gz |
SERVER-23283 RangeDeleter does not log cursor ids correctly in deleteNow()
(cherry picked from commit 26603490725d969247044de4f36f487972264023)
-rw-r--r-- | src/mongo/db/range_deleter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/range_deleter.cpp b/src/mongo/db/range_deleter.cpp index aaf19b6125b..4ba63e8a447 100644 --- a/src/mongo/db/range_deleter.cpp +++ b/src/mongo/db/range_deleter.cpp @@ -317,30 +317,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."; |