Skip to content

Commit

Permalink
fix resequencing
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Jan 6, 2025
1 parent 451cb91 commit 1cbb04c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions zk/stages/stage_sequence_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ func SpawnSequencingStage(
}

if lastBatch < highestBatchInDs {
if err = cfg.dataStreamServer.UnwindToBatchStart(lastBatch + 1); err != nil {
return err
}
if !cfg.zk.IsL1Recovery() {
if !cfg.zk.SequencerResequence {
if err = cfg.dataStreamServer.UnwindToBatchStart(lastBatch + 1); err != nil {
return err
}
} else {
return resequence(s, u, ctx, cfg, historyCfg, lastBatch, highestBatchInDs)
}
}
Expand Down
4 changes: 4 additions & 0 deletions zk/stages/stage_sequence_execute_resequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ func resequence(
return err
}

if err = cfg.dataStreamServer.UnwindToBatchStart(lastBatch + 1); err != nil {
return err
}

log.Info(fmt.Sprintf("[%s] Resequence from batch %d to %d in data stream", s.LogPrefix(), lastBatch+1, highestBatchInDs))
for _, batch := range batches {
batchJob := NewResequenceBatchJob(batch)
Expand Down

0 comments on commit 1cbb04c

Please sign in to comment.