Skip to content

Commit 4516a2f

Browse files
committed
Fix error messages in redpada_migrator_offsets output
Signed-off-by: Mihai Todor <mihai.todor@contractor.redpanda.com>
1 parent c7a6325 commit 4516a2f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/impl/kafka/output_redpanda_migrator_offsets.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ func (w *redpandaMigratorOffsetsWriter) Write(ctx context.Context, msg *service.
310310
if isHighWatermark && offset.Timestamp != -1 {
311311
offsets, err := w.client.ListEndOffsets(ctx, topic)
312312
if err != nil {
313-
return fmt.Errorf("failed to list the high watermark for topic %q and partition %q (timestamp %d): %s", topic, partition, offsetCommitTimestamp, err)
313+
return fmt.Errorf("failed to list the high watermark for topic %q and partition %d (timestamp %d): %s", topic, partition, offsetCommitTimestamp, err)
314314
}
315315

316316
highWatermark, ok := offsets.Lookup(topic, partition)
317317
if !ok {
318-
return fmt.Errorf("failed to read the high watermark for topic %q and partition %q (timestamp %d): %s", topic, partition, offsetCommitTimestamp, err)
318+
return fmt.Errorf("failed to read the high watermark for topic %q and partition %d (timestamp %d): %s", topic, partition, offsetCommitTimestamp, err)
319319
}
320320
if highWatermark.Offset == offset.Offset+1 {
321321
offset.Offset = highWatermark.Offset
@@ -333,14 +333,14 @@ func (w *redpandaMigratorOffsetsWriter) Write(ctx context.Context, msg *service.
333333

334334
offsetResponses, err := w.client.CommitOffsets(ctx, group, offsets)
335335
if err != nil {
336-
return fmt.Errorf("failed to commit consumer offsets for topic %q and partition %q (timestamp %d): %s", topic, partition, offsetCommitTimestamp, err)
336+
return fmt.Errorf("failed to commit consumer offsets for topic %q and partition %d (timestamp %d): %s", topic, partition, offsetCommitTimestamp, err)
337337
}
338338

339339
if err := offsetResponses.Error(); err != nil {
340-
return fmt.Errorf("committed consumer offsets returned an error for topic %q and partition %q (timestamp %d): %s", topic, partition, offsetCommitTimestamp, err)
340+
return fmt.Errorf("committed consumer offsets returned an error for topic %q and partition %d (timestamp %d): %s", topic, partition, offsetCommitTimestamp, err)
341341
}
342342

343-
w.mgr.Logger().Debugf("Wrote offset for topic %q and timestamp %d: %d", topic, offsetCommitTimestamp, offset.Offset)
343+
w.mgr.Logger().Debugf("Wrote offset for topic %q and partition %d and timestamp %d: %d", topic, partition, offsetCommitTimestamp, offset.Offset)
344344

345345
return nil
346346
}

0 commit comments

Comments
 (0)