Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
commit max-1 in block-scheduler (max offset is exclusive)
  • Loading branch information
owen-d committed Dec 11, 2024
commit c6ed241b168646e63ed9e562d19b461d4445970e
3 changes: 1 addition & 2 deletions pkg/blockbuilder/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,10 @@ func (s *BlockScheduler) HandleCompleteJob(ctx context.Context, job *types.Job,
logger := log.With(s.logger, "job", job.ID())

if success {
// TODO(owen-d): do i need to increment offset here?
if err = s.offsetManager.Commit(
ctx,
job.Partition(),
job.Offsets().Max,
job.Offsets().Max-1, // max is exclusive, so commit max-1
); err == nil {
s.queue.MarkComplete(job.ID(), types.JobStatusComplete)
level.Info(logger).Log("msg", "job completed successfully")
Expand Down
Loading