Skip to content

Commit d754727

Browse files
committed
kcl: fix for minor franz-go breaking change
Maybe the last?
1 parent 827cef5 commit d754727

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

commands/admin/txn/unhang.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,13 @@ func unstick(kcl *client.Client, topic string) {
149149
out.Die("fetch errors while looking for stuck partition: %v", errs)
150150
}
151151
fetches.EachPartition(func(tp kgo.FetchTopicPartition) {
152-
p := tp.Partition
153-
delete(possibleParts, p.Partition)
154-
if p.HighWatermark == p.LastStableOffset {
152+
delete(possibleParts, tp.Partition)
153+
if tp.HighWatermark == tp.LastStableOffset {
155154
return
156155
}
157156
found = true
158-
stuckPartition = p.Partition
159-
stuckOffset = p.LastStableOffset
157+
stuckPartition = tp.Partition
158+
stuckOffset = tp.LastStableOffset
160159
})
161160
}
162161

commands/consume/consume.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func (co *consumeOutput) consume() {
244244
}
245245

246246
if co.numPerPartition > 0 {
247-
tp := topicPartition{p.Topic, p.Partition.Partition}
247+
tp := topicPartition{p.Topic, p.Partition}
248248
seen := perPartitionSeen[tp]
249249
if seen >= co.numPerPartition {
250250
return
@@ -254,7 +254,7 @@ func (co *consumeOutput) consume() {
254254
}
255255

256256
co.num++
257-
co.format(r, &p.Partition)
257+
co.format(r, &p.FetchPartition)
258258

259259
if co.num == co.max {
260260
os.Exit(0)

0 commit comments

Comments
 (0)