Skip to content

Commit

Permalink
ErrDataLoss: use the new offset **after** we create the error
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Sep 20, 2021
1 parent 43cdcad commit f6a8c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kgo/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1569,8 +1569,8 @@ func (cl *Client) loadEpochsForBrokerLoad(ctx context.Context, broker *broker, l
offset := loadPart.at
var err error
if rPartition.EndOffset < offset {
offset = rPartition.EndOffset
err = &ErrDataLoss{topic, partition, offset, rPartition.EndOffset}
offset = rPartition.EndOffset
}

loaded.add(loadedOffset{
Expand Down

0 comments on commit f6a8c9a

Please sign in to comment.