-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: WiredTiger
-
None
-
Fully Compatible
-
(copied to CRM)
A configuration setting for WiredTiger limits how many operations can happen in a single thread context at a point in time, that is controlled via the wiredtiger_open::hazard_max configuration option.
There are some MongoDB workloads that try to use more than the configured maximum number of hazard pointers, which leads to an invariant failure in MongoDB of the form:
2016-09-04T21:28:55.564+0800 E STORAGE [conn858615] WiredTiger (0) [1472995735:547997][1153:0x7f48d9a80700], file:index-109--487061380080497386.wt, cursor.search_near: session 0x2dc23c0: hazard pointer table full
2016-09-04T21:28:55.571+0800 I - [conn858615] Invariant failure: ret resulted in status UnknownError 12: Cannot allocate memory at src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp 732
2016-09-04T21:28:55.786+0800 I CONTROL [conn858615]
We should review handling of operations that could fail due to hazard pointer exhaustion, and see if we can improve error handling. Probably making the individual operation return an error, but allowing the server to stay alive.