aiven / kafka

Mirror of Apache Kafka
Apache License 2.0
2 stars 1 forks source link

Broker forgets to delete uploaded segment when restarted #13

Closed ivanyu closed 1 month ago

ivanyu commented 1 year ago

If a broker uploaded a segment to the remote, but didn't delete it locally and was restarted, it will not delete the local segment after restart until the next segment is uploaded. Most likely, because this remains -1 until the next segment upload (in this log).

Possible fix: update highestOffsetWithRemoteIndex on start for the leader.