@@ -45,8 +45,8 @@ private UnfollowAction() {}
4545 public List <Step > toSteps (Client client , String phase , StepKey nextStepKey ) {
4646 StepKey preUnfollowKey = new StepKey (phase , NAME , CONDITIONAL_UNFOLLOW_STEP );
4747 StepKey indexingComplete = new StepKey (phase , NAME , WaitForIndexingCompleteStep .NAME );
48- StepKey waitForFollowShardTasks = new StepKey (phase , NAME , WaitForFollowShardTasksStep .NAME );
4948 StepKey waitUntilTimeSeriesEndTimePassesStep = new StepKey (phase , NAME , WaitUntilTimeSeriesEndTimePassesStep .NAME );
49+ StepKey waitForFollowShardTasks = new StepKey (phase , NAME , WaitForFollowShardTasksStep .NAME );
5050 StepKey pauseFollowerIndex = new StepKey (phase , NAME , PauseFollowerIndexStep .NAME );
5151 StepKey closeFollowerIndex = new StepKey (phase , NAME , CloseFollowerIndexStep .NAME );
5252 StepKey unfollowFollowerIndex = new StepKey (phase , NAME , UnfollowFollowerIndexStep .NAME );
@@ -61,16 +61,18 @@ public List<Step> toSteps(Client client, String phase, StepKey nextStepKey) {
6161 // if the index has no CCR metadata we'll skip the unfollow action completely
6262 return customIndexMetadata == null ;
6363 });
64- WaitForIndexingCompleteStep step1 = new WaitForIndexingCompleteStep (indexingComplete , waitForFollowShardTasks );
65- WaitForFollowShardTasksStep step2 = new WaitForFollowShardTasksStep (
66- waitForFollowShardTasks ,
64+ WaitForIndexingCompleteStep step1 = new WaitForIndexingCompleteStep (indexingComplete , waitUntilTimeSeriesEndTimePassesStep );
65+
66+ WaitUntilTimeSeriesEndTimePassesStep step2 = new WaitUntilTimeSeriesEndTimePassesStep (
6767 waitUntilTimeSeriesEndTimePassesStep ,
68- client
68+ waitForFollowShardTasks ,
69+ Instant ::now
6970 );
70- WaitUntilTimeSeriesEndTimePassesStep step3 = new WaitUntilTimeSeriesEndTimePassesStep (
71- waitUntilTimeSeriesEndTimePassesStep ,
71+
72+ WaitForFollowShardTasksStep step3 = new WaitForFollowShardTasksStep (
73+ waitForFollowShardTasks ,
7274 pauseFollowerIndex ,
73- Instant :: now
75+ client
7476 );
7577 PauseFollowerIndexStep step4 = new PauseFollowerIndexStep (pauseFollowerIndex , closeFollowerIndex , client );
7678 CloseFollowerIndexStep step5 = new CloseFollowerIndexStep (closeFollowerIndex , unfollowFollowerIndex , client );
0 commit comments