Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should share the max retries of metadata? #2895

Closed
yitian108 opened this issue May 13, 2024 · 2 comments
Closed

Should share the max retries of metadata? #2895

yitian108 opened this issue May 13, 2024 · 2 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@yitian108
Copy link

Description

When reviewing the function tryRefreshMetadata() in client.go, I noticed a shared variable attemptsRemaining (initialized as Metadata.Retry.Max) within the subfunction retry(). Every call to the function retry() decreases the value of attemptsRemaining. For instance, if the initial value of attemptsRemaining is 3, when the broker is unavailable, it decreases by 1. In another scenario where there is no leader for some partitions, attemptsRemaining decreases from 2 instead of the initial value of 3. Shouldn't it be reset for different reasons?

The snippet of the func tryRefreshMetadata()

image

Sarama version: 1.42.2

@puellanivis
Copy link
Contributor

I’ve not really heard of a situation where attempts are per specific error issue, rather than just generically for any issue.

Copy link

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@github-actions github-actions bot added the stale Issues and pull requests without any recent activity label Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

2 participants