diff options
-rw-r--r-- | jstests/concurrency/fsm_workload_modifiers/make_capped.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/concurrency/fsm_workload_modifiers/make_capped.js b/jstests/concurrency/fsm_workload_modifiers/make_capped.js index d17f291faa6..abe6ebc8264 100644 --- a/jstests/concurrency/fsm_workload_modifiers/make_capped.js +++ b/jstests/concurrency/fsm_workload_modifiers/make_capped.js @@ -35,6 +35,14 @@ function makeCapped($config, $super) { // failures due to collection truncation globalAssertLevel = AssertLevel.ALWAYS; $super.states.find.apply(this, arguments); + } catch (e) { + if (e.message.indexOf('CappedPositionLost') >= 0) { + // Ignore errors when a cursor's position in the capped collection is deleted. + // Reads from the beginning of a capped collection are not guaranteed to succeed + // when there are concurrent inserts that cause a truncation. + return; + } + throw e; } finally { globalAssertLevel = oldAssertLevel; } |