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

Add retry logic to GetOffset() just like Leader() #394

Merged
merged 1 commit into from
Apr 7, 2015

Conversation

eapache
Copy link
Contributor

@eapache eapache commented Mar 25, 2015

Which is: refresh the metadata and retry once, in case e.g. our connection or
metadata is stale.

Also add a test for it.

@Shopify/kafka

Which is: refresh the metadata and retry once, in case e.g. our connection or
metadata is stale.

Also add a test for it.
}

return block.Offsets[0], nil
return offset, err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this will basically do endless retries, as long a RefreshMetadata doesn't return an error? Is that something we should watch out for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually nvm, it just does one retry. I imagined a for loop that isn't there.

@wvanbergen
Copy link
Contributor

This is a nice improvement 👍

eapache added a commit that referenced this pull request Apr 7, 2015
Add retry logic to GetOffset() just like Leader()
@eapache eapache merged commit fe647d8 into master Apr 7, 2015
@eapache eapache deleted the retry-get-offset branch April 7, 2015 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants