From 1a66a6b1f926f800726d1f9554e8491ea42ba8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Thu, 14 Mar 2024 09:38:48 -0400 Subject: [PATCH] fix 'skip store' mechanism, don't skip the store that we are actually working on --- service/tier2.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/service/tier2.go b/service/tier2.go index 8f71bd371..bee9e3fc0 100644 --- a/service/tier2.go +++ b/service/tier2.go @@ -292,7 +292,8 @@ func (s *Tier2Service) processRange(ctx context.Context, request *pbssinternal.P outputModule := outputGraph.OutputModule() var execOutWriter *execout.Writer - if !outputGraph.StagedUsedModules()[request.Stage].LastLayer().IsStoreLayer() { + isOutputMapperStage := !outputGraph.StagedUsedModules()[request.Stage].LastLayer().IsStoreLayer() + if isOutputMapperStage { execOutWriter = execout.NewWriter( requestDetails.ResolvedStartBlockNum, requestDetails.StopBlockNum, @@ -310,10 +311,9 @@ func (s *Tier2Service) processRange(ctx context.Context, request *pbssinternal.P if err != nil { continue } - if name == request.OutputModule { + if isOutputMapperStage && name == request.OutputModule { logger.Info("found existing exec output for output_module, skipping run", zap.String("output_module", name)) return nil - } existingExecOuts[name] = file } @@ -423,7 +423,7 @@ func checkSkipBlocksAndStores(existingExecOuts map[string]*execout.File, outputG skipBlocks = true skipStores = true for _, module := range outputGraph.UsedModules() { - if existingExecOuts[module.Name] != nil { + if existingExecOuts[module.Name] != nil && outputGraph.OutputModule().Name != module.Name { // we don't skip the store if that store is actually our output module continue } for _, input := range module.Inputs {