Skip to content

Commit

Permalink
fix 'skip store' mechanism, don't skip the store that we are actually…
Browse files Browse the repository at this point in the history
… working on
  • Loading branch information
sduchesneau committed Mar 14, 2024
1 parent 256e5d9 commit 1a66a6b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions service/tier2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 1a66a6b

Please sign in to comment.