commit 9807db8cd3edcbec95862a10b27eda88b329424c Author: James Wahlin Date: Fri Oct 16 11:08:54 2015 -0400 Increase yield frequency and slow down query execution diff --git a/src/mongo/db/query/query_knobs.cpp b/src/mongo/db/query/query_knobs.cpp index e9095a7..0b6d13a 100644 --- a/src/mongo/db/query/query_knobs.cpp +++ b/src/mongo/db/query/query_knobs.cpp @@ -67,7 +67,7 @@ MONGO_EXPORT_SERVER_PARAMETER(internalQueryMaxScansToExplode, int, 200); MONGO_EXPORT_SERVER_PARAMETER(internalQueryExecMaxBlockingSortBytes, int, 32 * 1024 * 1024); // Yield every 128 cycles or 10ms. -MONGO_EXPORT_SERVER_PARAMETER(internalQueryExecYieldIterations, int, 128); +MONGO_EXPORT_SERVER_PARAMETER(internalQueryExecYieldIterations, int, 1); MONGO_EXPORT_SERVER_PARAMETER(internalQueryExecYieldPeriodMS, int, 10); } // namespace mongo diff --git a/src/mongo/db/query/query_yield.cpp b/src/mongo/db/query/query_yield.cpp index 10d66de..1041dab 100644 --- a/src/mongo/db/query/query_yield.cpp +++ b/src/mongo/db/query/query_yield.cpp @@ -67,6 +67,8 @@ void QueryYield::yieldAllLocks(OperationContext* txn, RecordFetcher* fetcher) { fetcher->fetch(); } + sleepmillis(100); + locker->restoreLockState(snapshot); }