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

feat: Increase backpressure threshold to 5 seconds #340

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

lynnagara
Copy link
Member

During inc-626 we saw excessive backpressure which caused the consumer to be paused and resumed a lot. This led to excessive network traffic as the local queue was purged and messages were re-downloaded. Increase the threshold for pausing to reduce the impact of this.

During inc-626 we saw excessive backpressure which caused
the consumer to be paused and resumed a lot. This led to
excessive network traffic as the local queue was purged and
messages were re-downloaded. Increase the threshold for pausing
to reduce the impact of this.
@lynnagara lynnagara requested a review from a team as a code owner February 23, 2024 17:35
@lynnagara lynnagara requested a review from a team February 23, 2024 17:35
@@ -86,7 +86,7 @@ def test_stream_processor_lifecycle() -> None:
with assert_changes(lambda: int(consumer.pause.call_count), 0, 1):
processor._run_once()
assert strategy.submit.call_args_list[-1] == mock.call(message)
time.sleep(1)
time.sleep(5)
Copy link
Member Author

Choose a reason for hiding this comment

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

🤮

Copy link
Member

Choose a reason for hiding this comment

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

please mock time.time instead

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@@ -86,7 +86,7 @@ def test_stream_processor_lifecycle() -> None:
with assert_changes(lambda: int(consumer.pause.call_count), 0, 1):
processor._run_once()
assert strategy.submit.call_args_list[-1] == mock.call(message)
time.sleep(1)
time.sleep(5)
Copy link
Member

Choose a reason for hiding this comment

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

please mock time.time instead

@lynnagara lynnagara merged commit 4752f58 into main Feb 23, 2024
11 checks passed
@lynnagara lynnagara deleted the increase-backpressure-threshold branch February 23, 2024 19:58
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