summaryrefslogtreecommitdiff
path: root/jstests/hooks
diff options
context:
space:
mode:
authorVesselina Ratcheva <vesselina.ratcheva@10gen.com>2020-02-14 16:17:33 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-18 18:27:39 +0000
commit34dc015fcb40b8e4c2c99aadf1a78d7b64de6146 (patch)
tree62716f0181b9f755cce63ee6ad55ad1d0f42a636 /jstests/hooks
parentc18271eaf8bf8a85549ffec363748b40e57b9392 (diff)
downloadmongo-34dc015fcb40b8e4c2c99aadf1a78d7b64de6146.tar.gz
SERVER-45610 Reject commands that read data when node is in RECOVERING state
This reverts commit 542de84ec1e17520bd0d99d54a024ff0e0bc3de2. 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