-
Notifications
You must be signed in to change notification settings - Fork 205
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: remove suboptimal logic in leasing behavior #816
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
product-auto-label
bot
added
size: xs
Pull request size is extra small.
api: pubsub
Issues related to the googleapis/python-pubsub API.
labels
Oct 28, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Oct 28, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Oct 28, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Oct 28, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Oct 28, 2022
This reverts commit 01f7ff4.
product-auto-label
bot
added
size: u
Pull request is empty.
and removed
size: xs
Pull request size is extra small.
labels
Nov 1, 2022
product-auto-label
bot
added
size: m
Pull request size is medium.
and removed
size: u
Pull request is empty.
labels
Nov 3, 2022
acocuzzo
changed the title
fix: subtract time spent leasing from max snooze value
fix: remove suboptimal list operations in leasing
Nov 3, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 3, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 3, 2022
acocuzzo
changed the title
fix: remove suboptimal list operations in leasing
fix: remove suboptimal logic in leasing behavior
Nov 3, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 3, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 3, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 7, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 7, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 7, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 7, 2022
pradn
requested changes
Nov 7, 2022
google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py
Outdated
Show resolved
Hide resolved
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 8, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 8, 2022
pradn
reviewed
Nov 9, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 10, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 10, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 10, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 10, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 10, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 10, 2022
acocuzzo
added
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 10, 2022
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Nov 10, 2022
pradn
approved these changes
Nov 11, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the streaming_pull_manager calls "_send_lease_modacks," we specific a single modify_ack_deadline_seconds to populate the ModackRequests, however in the dispatcher, we iterate over the requests to pass a list of deadline_seconds back to the streaming_pull_manager.send_unary_modack, where we then separate the requests by deadline.
This causes unecessary list creation and iteration, which we eliminate by passing a "default_deadline" to dispatcher.modify_ack_deadline and streaming_pull_manager.send_unary_modack.
We remove unnecessary casting of itertools.islice objects to lists in dispatcher.modify_ack_deadline
We remove unecessary appending to a list and casting the list to a Set in the leaser, and instead pass a Set of expired_ack_ids from _send_lease_modacks.
If exactly once is enabled, we check the return value of _send_lease_modacks and drop the expired ack ids from leasing