From 1dfd2cffcf1dc0cc49fe37e0f98daf8d464e0a5e Mon Sep 17 00:00:00 2001 From: Max Hirschhorn Date: Mon, 21 Dec 2015 12:53:34 -0500 Subject: [PATCH] SERVER-21835 Ignore errors due to CappedPositionLost in make_capped.js. (cherry picked from commit 9736f7439eda1f6a7856c535683fda239be86e04) --- jstests/concurrency/fsm_workload_modifiers/make_capped.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }