diff --git a/src/mongo/db/timeseries/timeseries_write_util.cpp b/src/mongo/db/timeseries/timeseries_write_util.cpp index 6563ca3bd37..9c06c1cbf51 100644 --- a/src/mongo/db/timeseries/timeseries_write_util.cpp +++ b/src/mongo/db/timeseries/timeseries_write_util.cpp @@ -103,6 +103,8 @@ namespace { MONGO_FAIL_POINT_DEFINE(timeseriesDataIntegrityCheckFailureUpdate); MONGO_FAIL_POINT_DEFINE(runPostCommitDebugChecks); +MONGO_FAIL_POINT_DEFINE(hangOnBucketAggregation); + // Return a verifierFunction that is used to perform a data integrity check on inserts into // a compressed column. @@ -629,6 +631,9 @@ BSONObj getSuitableBucketForReopening(OperationContext* opCtx, reopeningContext.queriedBucket = true; DBDirectClient client{opCtx}; + if (MONGO_unlikely(hangOnBucketAggregation.shouldFail())) { + hangOnBucketAggregation.pauseWhileSet(opCtx); + } // Run an aggregation to find a suitable bucket to reopen. AggregateCommandRequest aggRequest(bucketsColl->ns(), pipeline); aggRequest.setHint(index);