diff options
author | Louis Williams <louis.williams@mongodb.com> | 2020-07-09 13:08:19 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-09 17:40:17 +0000 |
commit | ab4d803f1f2f57cf9dbec89175f8eb52cb4761f2 (patch) | |
tree | 4b45acdad4db1f233992794dde81079cae8be3e0 /jstests/hooks | |
parent | a6cd89a6c4d39b4b21376b109ad335e2fda8fb5d (diff) | |
download | mongo-ab4d803f1f2f57cf9dbec89175f8eb52cb4761f2.tar.gz |
SERVER-43060 CheckReplDBHashInBackground should retry the dbHash command on WriteConflicts in debug builds
Diffstat (limited to 'jstests/hooks')
-rw-r--r-- | jstests/hooks/run_check_repl_dbhash_background.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/hooks/run_check_repl_dbhash_background.js b/jstests/hooks/run_check_repl_dbhash_background.js index 66a85c43c36..1a61b3c2785 100644 --- a/jstests/hooks/run_check_repl_dbhash_background.js +++ b/jstests/hooks/run_check_repl_dbhash_background.js @@ -309,6 +309,14 @@ function checkReplDbhashBackgroundThread(hosts) { hasTransientError = true; } + // In debug builds, read-only operations can receive write conflicts when the storage + // engine cache is full. Since dbHash holds open a read snapshot for an extended period + // of time and pulls all collection data into cache, the storage engine may abort the + // operation if it needs to free up space. Try again after space has been freed. + if (e.code === ErrorCodes.WriteConflict && buildInfo().debug) { + hasTransientError = true; + } + return hasTransientError; }; |