confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
7.37k stars 3.11k forks source link

Undesired partition migration happening because of stale metadata #4687

Closed emasab closed 1 month ago

emasab commented 2 months ago

Description

A partition migration can happen, using stale metadata, when the partition is validating a next_fetch_startand retring the validation. It can use stale metadata with an invalid leader epoch and migrate back to the previous leader. Later this is corrected but it's sub-optimal.

How to reproduce

Execute test 0146/do_test_stale_metadata_doesnt_migrate_partition in #4680.

Checklist

Please provide the following information: