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: Avoid polling the consumer if it says it's paused #412

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

untitaker
Copy link
Member

@untitaker untitaker commented Dec 17, 2024

There is a bug in StreamProcessor where self.__is_paused, but at the
same time we poll the consumer and get messages.

  File "sentry/runner/commands/run.py", line 455, in basic_consumer
    run_processor_with_signals(processor, consumer_name)
  File "sentry/utils/kafka.py", line 46, in run_processor_with_signals
    processor.run()
  File "arroyo/processing/processor.py", line 323, in run
    self._run_once()
  File "arroyo/processing/processor.py", line 442, in _run_once
    assert self.__consumer.poll(0.1) is None

Breadcrumbs indicate that rebalancing was happening at that time. Could
it be that we were paused, but the consumer got more partitions
assigned? It doesn't make sense since we don't have cooperative-sticky
rebalancing enabled, let's add more logs and prevent the crash.

related: #391

There is a bug in StreamProcessor where self.__is_paused, but at the
same time we poll the consumer and get messages.

      File "sentry/runner/commands/run.py", line 455, in basic_consumer
        run_processor_with_signals(processor, consumer_name)
      File "sentry/utils/kafka.py", line 46, in run_processor_with_signals
        processor.run()
      File "arroyo/processing/processor.py", line 323, in run
        self._run_once()
      File "arroyo/processing/processor.py", line 442, in _run_once
        assert self.__consumer.poll(0.1) is None

Breadcrumbs indicate that rebalancing was happening at that time. Could
it be that we were paused, but the consumer got more partitions
assigned? It doesn't make sense since we don't have cooperative-sticky
rebalancing enabled, let's add more logs and prevent the crash.
@untitaker untitaker requested review from a team as code owners December 17, 2024 19:11
@untitaker
Copy link
Member Author

related: #413

@untitaker untitaker merged commit bb3aaf5 into main Dec 19, 2024
14 checks passed
@untitaker untitaker deleted the fix/paused-but-not-paused branch December 19, 2024 01:57
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.

3 participants