diff --git a/pkg/controller/nodes/task/handler.go b/pkg/controller/nodes/task/handler.go index 5c48441c0..a641b33bc 100644 --- a/pkg/controller/nodes/task/handler.go +++ b/pkg/controller/nodes/task/handler.go @@ -536,13 +536,6 @@ func (t Handler) Handle(ctx context.Context, nCtx interfaces.NodeExecutionContex ts := nCtx.NodeStateReader().GetTaskNodeState() pluginTrns := &pluginRequestedTransition{} - defer func() { - // increment parallelism if the final pluginTrns is not in a terminal state - if pluginTrns != nil && !pluginTrns.pInfo.Phase().IsTerminal() { - eCtx := nCtx.ExecutionContext() - logger.Infof(ctx, "Parallelism now set to [%d].", eCtx.IncrementParallelism()) - } - }() // We will start with the assumption that catalog is disabled pluginTrns.PopulateCacheInfo(catalog.NewFailedCatalogEntry(catalog.NewStatus(core.CatalogCacheStatus_CACHE_DISABLED, nil))) @@ -667,6 +660,10 @@ func (t Handler) Handle(ctx context.Context, nCtx interfaces.NodeExecutionContex return handler.UnknownTransition, err } + // increment parallelism if the final pluginTrns is not in a terminal state + if pluginTrns != nil && !pluginTrns.pInfo.Phase().IsTerminal() { + logger.Infof(ctx, "Parallelism now set to [%d].", nCtx.ExecutionContext().IncrementParallelism()) + } return pluginTrns.FinalTransition(ctx) }