summaryrefslogtreecommitdiff
path: root/jstests/hooks
diff options
context:
space:
mode:
authorVesselina Ratcheva <vesselina.ratcheva@10gen.com>2020-01-23 15:57:11 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-13 22:24:40 +0000
commitea7294598dc4621245739da201c0aeaf11aaf957 (patch)
tree68081d188ed83dd6cf767c2946b11529d1bc1f7a /jstests/hooks
parent81d78ae4ff9ea93a5b6ec6b3134557310d89d64d (diff)
downloadmongo-ea7294598dc4621245739da201c0aeaf11aaf957.tar.gz
SERVER-45610 Reject commands that read data when node is in RECOVERING state
create mode 100644 jstests/libs/all_commands_test.js create mode 100644 jstests/replsets/db_reads_while_recovering_all_commands.js
Diffstat (limited to 'jstests/hooks')
-rw-r--r--jstests/hooks/validate_collections.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/hooks/validate_collections.js b/jstests/hooks/validate_collections.js
index b0bc3461ddf..58e1c5bb276 100644
--- a/jstests/hooks/validate_collections.js
+++ b/jstests/hooks/validate_collections.js
@@ -91,6 +91,12 @@ function CollectionValidator() {
conn.setSlaveOk();
jsTest.authenticate(conn);
+ // Skip validating collections for arbiters.
+ if (conn.getDB('admin').isMaster('admin').arbiterOnly === true) {
+ print('Skipping collection validation on arbiter ' + host);
+ return {ok: 1};
+ }
+
const requiredFCV = jsTest.options().forceValidationWithFeatureCompatibilityVersion;
if (requiredFCV) {
// Make sure this node has the desired FCV as it may take time for the updates to