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

fix: pass in ctx with cancel for renewLease #37

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

spentakota
Copy link
Contributor

No description provided.

@@ -313,5 +319,10 @@ func (sc *PollingShardConsumer) renewLease() error {
}
// log metric for renewed lease for worker
sc.mService.LeaseRenewed(sc.shard.ID)
select {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's put this at the top of the loop to avoid unnecessary renewal if the cancel is immediate.

Signed-off-by: Shiva Pentakota <spentakota@vmware.com>
@spentakota spentakota merged commit b12921d into main Apr 7, 2023
3 checks passed
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.

None yet

2 participants