Avoid race condition in maintain_leases by copying leased_messages#5035
Merged
Merged
Conversation
lukesneeringer
approved these changes
Mar 14, 2018
Contributor
|
@jonparrott This change is causing unit test failures for me: _____________________ test_maintain_leases_outdated_items ______________________
Traceback (most recent call last):
File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/pubsub/tests/unit/pubsub_v1/subscriber/test_policy_base.py", line 327, in test_maintain_leases_outdated_items
modify_deadline_seconds=[10],
File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/pubsub/.nox/unit-3-6/lib/python3.6/site-packages/mock/mock.py", line 948, in assert_called_once_with
return self.assert_called_with(*args, **kwargs)
File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/pubsub/.nox/unit-3-6/lib/python3.6/site-packages/mock/mock.py", line 937, in assert_called_with
six.raise_from(AssertionError(_error_message(cause)), cause)
File "<string>", line 3, in raise_from
AssertionError: Expected call: send_request(modify_deadline_seconds: 10
modify_deadline_ack_ids: "ack2"
)
Actual call: send_request(modify_deadline_seconds: 10
modify_deadline_seconds: 10
modify_deadline_ack_ids: "ack1"
modify_deadline_ack_ids: "ack2"
)
------------------------------ Captured log call -------------------------------
base.py 382 WARNING Dropping 1 items because they were leased too long. |
Contributor
Author
|
@tseaver if it's blocking you feel free to roll it back until I can take a closer look., |
Contributor
|
I'm not blocked except from helping on pubsub issues. |
parthea
pushed a commit
that referenced
this pull request
Mar 2, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.