diff --git a/pipeline/process_block.go b/pipeline/process_block.go index 17d93b45..f2b445b3 100644 --- a/pipeline/process_block.go +++ b/pipeline/process_block.go @@ -298,7 +298,6 @@ func (p *Pipeline) executeModules(ctx context.Context, execOutput execout.Execut p.extraMapModuleOutputs = nil p.extraStoreModuleOutputs = nil blockNum := execOutput.Clock().Number - block := fmt.Sprintf("%d (%s)", blockNum, execOutput.Clock().Id) // they may be already built, but we call this function every time to enable future dynamic changes if err := p.BuildModuleExecutors(ctx); err != nil { @@ -318,7 +317,7 @@ func (p *Pipeline) executeModules(ctx context.Context, execOutput execout.Execut } res := p.execute(ctx, executor, execOutput) if err := p.applyExecutionResult(ctx, executor, res, execOutput); err != nil { - return fmt.Errorf("applying executor results %q on block %s: %w", executor.Name(), block, res.err) + return fmt.Errorf("applying executor results %q on block %d (%s): %w", executor.Name(), blockNum, execOutput.Clock().Id, res.err) } } } else { @@ -351,7 +350,7 @@ func (p *Pipeline) executeModules(ctx context.Context, execOutput execout.Execut return fmt.Errorf("running executor %q: %w", executor.Name(), result.err) } if err := p.applyExecutionResult(ctx, executor, result, execOutput); err != nil { - return fmt.Errorf("applying executor results %q on block %s: %w", executor.Name(), block, result.err) + return fmt.Errorf("applying executor results %q on block %d (%s): %w", executor.Name(), blockNum, execOutput.Clock(), result.err) } } } diff --git a/storage/store/filename.go b/storage/store/filename.go index a4a03fd3..01b86299 100644 --- a/storage/store/filename.go +++ b/storage/store/filename.go @@ -65,17 +65,18 @@ func NewPartialFileInfo(moduleName string, start uint64, exclusiveEndBlock uint6 } func parseFileName(moduleName, filename string) (*FileInfo, bool) { - res := stateFileRegex.FindAllStringSubmatch(filename, 1) + res := stateFileRegex.FindAllSubmatchIndex([]byte(filename), 1) if len(res) != 1 { return nil, false } + fmt.Println(filename, res) return &FileInfo{ ModuleName: moduleName, Filename: filename, - Range: block.NewRange(uint64(mustAtoi(res[0][2])), uint64(mustAtoi(res[0][1]))), - Partial: res[0][4] == "partial", - WithTraceID: res[0][3] != "", + Range: block.NewRange(uint64(mustAtoi(filename[res[0][4]:res[0][5]])), uint64(mustAtoi(filename[res[0][2]:res[0][3]]))), + Partial: filename[res[0][8]:res[0][9]] == "partial", + WithTraceID: res[0][6] != -1, }, true }