File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -67,13 +67,17 @@ assert.commandWorked(primary.adminCommand({
67
67
assert . commandWorked ( testDB . adminCommand ( { replSetStepDown : 10 , secondaryCatchUpPeriodSecs : 10 } ) ) ;
68
68
rst . waitForState ( primary , ReplSetTest . State . SECONDARY ) ;
69
69
70
+ // Checking if a feature flag is enabled requires a connection to the primary. As a result, we must
71
+ // run the check before resuming the abort (which may cause the primary to crash if the feature flag
72
+ // is disabled).
73
+ const gracefulIndexBuildFlag = FeatureFlagUtil . isEnabled ( testDB , "IndexBuildGracefulErrorHandling" ) ;
74
+
70
75
// Resume the abort.
71
76
assert . commandWorked (
72
77
primary . adminCommand ( { configureFailPoint : "hangIndexBuildBeforeAbortCleanUp" , mode : "off" } ) ) ;
73
78
74
79
awaitIndexBuild ( ) ;
75
80
76
- const gracefulIndexBuildFlag = FeatureFlagUtil . isEnabled ( testDB , "IndexBuildGracefulErrorHandling" ) ;
77
81
if ( ! gracefulIndexBuildFlag ) {
78
82
// We expect the node to crash without this feature enabled.
79
83
assert . soon ( function ( ) {
You can’t perform that action at this time.
0 commit comments