diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-11 15:07:35 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-11 15:07:35 -0300 |
| commit | 4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch) | |
| tree | 1682a647d4463397c119183369ae6f750d5fdcff /jstests/hooks/run_dbcheck_background.js | |
| parent | aa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff) | |
| parent | 8f0827553e09872941945a093b647a4211a9db7f (diff) | |
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0'
with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'jstests/hooks/run_dbcheck_background.js')
| -rw-r--r-- | jstests/hooks/run_dbcheck_background.js | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/jstests/hooks/run_dbcheck_background.js b/jstests/hooks/run_dbcheck_background.js index bb4a67d85af..9a62ad58dd3 100644 --- a/jstests/hooks/run_dbcheck_background.js +++ b/jstests/hooks/run_dbcheck_background.js @@ -97,32 +97,16 @@ const exceptionFilteredBackgroundDbCheck = function(hosts) { const healthlog = node.getDB('local').system.healthlog; // Regex matching strings that start without "SnapshotTooOld" const regexStringWithoutSnapTooOld = /^((?!^SnapshotTooOld).)*$/; - - // healthlog is a capped collection, truncation during scan might cause cursor - // invalidation. Truncated data is most likely from previous tests in the fixture, so we - // should still be able to catch errors by retrying. - assert.soon(() => { - try { - let errs = healthlog.find( - {"severity": "error", "data.error": regexStringWithoutSnapTooOld}); - if (errs.hasNext()) { - const err = "dbCheck found inconsistency on " + node.host; - jsTestLog(err + ". Errors: "); - for (let count = 0; errs.hasNext() && count < 20; count++) { - jsTestLog(tojson(errs.next())); - } - assert(false, err); - } - return true; - } catch (e) { - if (e.code !== ErrorCodes.CappedPositionLost) { - throw e; - } - jsTestLog(`Retrying on CappedPositionLost error: ${tojson(e)}`); - return false; + let errs = + healthlog.find({"severity": "error", "data.error": regexStringWithoutSnapTooOld}); + if (errs.hasNext()) { + const err = "dbCheck found inconsistency on " + node.host; + jsTestLog(err + ". Errors: "); + for (let count = 0; errs.hasNext() && count < 20; count++) { + jsTestLog(tojson(errs.next())); } - }, "healthlog scan could not complete.", 60000); - + assert(false, err); + } jsTestLog("Checked health log on " + node.host); }); |
