summaryrefslogtreecommitdiff
path: root/jstests/sharding/configsvr_remove_chunks.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/configsvr_remove_chunks.js')
-rw-r--r--jstests/sharding/configsvr_remove_chunks.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/sharding/configsvr_remove_chunks.js b/jstests/sharding/configsvr_remove_chunks.js
index 32bd4de8e6a..9eed04de342 100644
--- a/jstests/sharding/configsvr_remove_chunks.js
+++ b/jstests/sharding/configsvr_remove_chunks.js
@@ -48,7 +48,9 @@ function insertLeftoverChunks(configDB, uuid) {
let st = new ShardingTest({mongos: 1, shards: 1});
-const configDB = st.s.getDB('config');
+// Use retriable writes when writing to the config server since these are not automatically retried
+const mongosSession = st.s.startSession({retryWrites: true});
+const configDB = mongosSession.getDatabase("config");
const dbName = "test";
const collName = "foo";