Skip to content

Commit bfd72b4

Browse files
fix: Revert "fix: Race condition occurs during initial sharding (argoproj#22264)" (argoproj#22354)
Signed-off-by: Andrii Korotkov <[email protected]>
1 parent f044200 commit bfd72b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

controller/appcontroller.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,9 @@ func (ctrl *ApplicationController) Run(ctx context.Context, statusProcessors int
886886
ctrl.RegisterClusterSecretUpdater(ctx)
887887
ctrl.metricsServer.RegisterClustersInfoSource(ctx, ctrl.stateCache, ctrl.db, ctrl.metricsClusterLabels)
888888

889+
go ctrl.appInformer.Run(ctx.Done())
890+
go ctrl.projInformer.Run(ctx.Done())
891+
889892
if ctrl.dynamicClusterDistributionEnabled {
890893
// only start deployment informer if dynamic distribution is enabled
891894
go ctrl.deploymentInformer.Informer().Run(ctx.Done())
@@ -904,9 +907,6 @@ func (ctrl *ApplicationController) Run(ctx context.Context, statusProcessors int
904907
}
905908
}
906909

907-
go ctrl.appInformer.Run(ctx.Done())
908-
go ctrl.projInformer.Run(ctx.Done())
909-
910910
errors.CheckError(ctrl.stateCache.Init())
911911

912912
if !cache.WaitForCacheSync(ctx.Done(), ctrl.appInformer.HasSynced, ctrl.projInformer.HasSynced) {

0 commit comments

Comments
 (0)