summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorSergi Mateo Bellido <sergi.mateo-bellido@mongodb.com>2022-09-07 18:02:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-14 08:17:19 +0000
commite5de2ad1815d9a9a6a0783c520985cdb0d2a3f06 (patch)
treee87d9abdd72a521c20ae0f199fcce3382a08946a /jstests
parent613271f381c0949e736c58c4a486d2a3da369788 (diff)
downloadmongo-e5de2ad1815d9a9a6a0783c520985cdb0d2a3f06.tar.gz
SERVER-64730 Interrupt ongoing refreshes after entering into the critical section
(cherry picked from commit 343108041c5b3570e97418ee3204804535fbde4d)
Diffstat (limited to 'jstests')
-rw-r--r--jstests/sharding/libs/resharding_test_fixture.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/jstests/sharding/libs/resharding_test_fixture.js b/jstests/sharding/libs/resharding_test_fixture.js
index 330d68892fb..8925c6dca88 100644
--- a/jstests/sharding/libs/resharding_test_fixture.js
+++ b/jstests/sharding/libs/resharding_test_fixture.js
@@ -598,7 +598,11 @@ var ReshardingTest = class {
/** @private */
_checkConsistency() {
- const nsCursor = this._st.s.getCollection(this._ns).find().sort({_id: 1});
+ // The "available" read concern level won't block this find cmd behind the critical section.
+ // Tests for resharding are not expected to have unowned documents in the collection being
+ // resharded.
+ const nsCursor =
+ this._st.s.getCollection(this._ns).find().readConcern("available").sort({_id: 1});
const tempNsCursor = this._st.s.getCollection(this._tempNs).find().sort({_id: 1});
const diff = ((diff) => {