-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines - Server Integration
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
If the oplog is almost empty or if the oplog pin is preventing truncation, but there is oplog whose retention by policy has expired, OplogCapMaintainerThread::_deleteExcessDocuments() will immediately return true without performing a truncate. This will cause the while (true) {} block in run() to spin without even a sleep() call until additional oplog is created or the pin changes.
The thread does check _shuttingDown inside that loop, and releases locks and mutexes between loops, so this does not prevent shutdown or cause correctness issues, but it does consume CPU when it shouldn't.