summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_workloads/insert_ttl_timeseries.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/concurrency/fsm_workloads/insert_ttl_timeseries.js')
-rw-r--r--jstests/concurrency/fsm_workloads/insert_ttl_timeseries.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/concurrency/fsm_workloads/insert_ttl_timeseries.js b/jstests/concurrency/fsm_workloads/insert_ttl_timeseries.js
index eadbb937cc9..891df4042c3 100644
--- a/jstests/concurrency/fsm_workloads/insert_ttl_timeseries.js
+++ b/jstests/concurrency/fsm_workloads/insert_ttl_timeseries.js
@@ -13,6 +13,8 @@
* ]
*/
+load('jstests/concurrency/fsm_workload_helpers/balancer.js');
+
var $config = (function() {
const initData = {
getCollectionName: function(collName) {
@@ -156,6 +158,14 @@ var $config = (function() {
}
function teardown(db, collName, cluster) {
+ if (TestData.runningWithBalancer) {
+ // Disallow balancing 'ns' so that it does not cause the TTLMonitor to fail rounds due
+ // to ongoing migration critical sections. TTLMonitor will retry on the next round, but
+ // it might not converge in time for the following assertion to pass.
+ BalancerHelper.disableBalancerForCollection(db, db[collName].getFullName());
+ BalancerHelper.joinBalancerRound(db);
+ }
+
// Default TTL monitor period
const ttlMonitorSleepSecs = 60;