All db record accesses that occur while a PageFaultRetryableSection is instantiated on a thread's stack must be wrapped in an exception handler for PageFaultException. WriteBatchExecutor::execInserts violates this rule, allowing PFE to escape up the stack, leading to server aborts when records are determined to not be in memory.
Correct use of PFRS is as follows:
bool done = false; PageFaultRetryableSection pFaultSection; while (!done) { try { DB*Lock myLock(dbname); // Do all operations involving record access here. ... done = true; } catch (const PageFaultException& pfe) { pfe.touch(); } }
- is duplicated by
-
SERVER-13121 ninserted is one too few, for write command batch inserts
- Closed