fix #2256 violates the functionality of config.Metadata.Retry.Max
#2527
Labels
needs-investigation
Issues that require followup from maintainers
stale
Issues and pull requests without any recent activity
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Configuration
What configuration values are you using for Sarama and Kafka?
Logs
When filing an issue please provide logs from Sarama and Kafka if at all
possible. You can set
sarama.Logger
to alog.Logger
to capture Sarama debugoutput.
logs: CLICK ME
Problem Description
In #2256,
updateMetaDataMs
is introduced to reduce the trigger of metadata refresh if there are multiple RefreshMetadata goroutines(to fix #1711).The logic above means that in one
MetadataRefresh
goroutine G1, during Nth retry and N+1th retry, if there is another goroutine G2 has refreshed the metadata, G1 will conclude the metadata refresh before initiating the N+1th retry, and directly returns theerr
gotten in the Nth retry, regardless of G2's result.For example, even if the maximum retry count is set to 5, the RefreshMetadata might return after only the 1st retry with the corresponding error.
Therefore, I think this commit is unsuitable since it violates the intended functionality of the
config.Metadata.Retry.Max
configuration..The text was updated successfully, but these errors were encountered: