Skip to content
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/main' into block-scheduler
  • Loading branch information
owen-d committed Dec 2, 2024
commit 1960226fbe86646f30894f16b5eee473867acf30
11 changes: 6 additions & 5 deletions pkg/blockbuilder/builder/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"fmt"
"time"

"github.com/grafana/loki/v3/pkg/blockbuilder/types"

"github.com/prometheus/prometheus/model/labels"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/dskit/backoff"
"github.com/prometheus/prometheus/model/labels"

"github.com/grafana/loki/v3/pkg/blockbuilder/types"
"github.com/grafana/loki/v3/pkg/kafka"
"github.com/grafana/loki/v3/pkg/kafka/partition"

Expand Down Expand Up @@ -202,10 +202,11 @@ func (l *PartitionJobController) LoadJob(ctx context.Context) (bool, *types.Job,

if highestOffset < committedOffset {
level.Error(l.logger).Log("msg", "partition highest offset is less than committed offset", "highest", highestOffset, "committed", committedOffset)
return false, Job{}, fmt.Errorf("partition highest offset is less than committed offset")
return false, nil, fmt.Errorf("partition highest offset is less than committed offset")
}

if highestOffset == committedOffset {
level.Info(l.logger).Log("msg", "no pending records to process")
return false, nil, nil
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.