Make RabbitMQ direct selects tolerate slow consumption by pamarcos · Pull Request #108364 · ClickHouse/ClickHouse · GitHub
Skip to content

Make RabbitMQ direct selects tolerate slow consumption#108364

Merged
pamarcos merged 2 commits into
masterfrom
fix-rabbitmq-slow-sanitizer-polling
Jun 24, 2026
Merged

Make RabbitMQ direct selects tolerate slow consumption#108364
pamarcos merged 2 commits into
masterfrom
fix-rabbitmq-slow-sanitizer-polling

Conversation

@pamarcos

@pamarcos pamarcos commented Jun 24, 2026

Copy link
Copy Markdown
Member

Make direct RabbitMQ select tests resilient to slow sanitizer/db-disk runs by resetting the polling deadline whenever accumulated rows increase. Direct selects consume rows from RabbitMQ, so the tests still accumulate returned batches rather than replacing the result.

CI report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108014&sha=ca91c12b238e033b5dc8c7453295e4e7017ac997&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%206%2F6%29

Related: #108014

No existing open tracking issue was found for test_rabbitmq_csv_with_delimiter or the RabbitMQ timeout.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Not required.

Documentation entry:

  • Documentation is not required.

Version info

  • Merged into: 26.7.1.33

Direct SELECT from `RabbitMQ` consumes rows, so tests must accumulate returned batches. Reset the polling deadline whenever accumulated rows increase to avoid failing while sanitizer/db-disk runs are still making progress.

CI report:

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108014&sha=ca91c12b238e033b5dc8c7453295e4e7017ac997

Related PR: #108014
@clickhouse-gh

clickhouse-gh Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves resiliency of RabbitMQ integration tests that use direct SELECT (which consumes messages) by switching from fixed-deadline polling loops to a progress-based polling helper that extends the deadline whenever more rows are accumulated.

Changes:

  • Added poll_direct_select_result helper to poll direct-select queries while extending the deadline on consumption progress.
  • Refactored multiple direct-select tests in test.py to use a shared check_direct_select_result_polling wrapper.
  • Updated test_shutdown.py to use the new polling helper for the virtual column direct-select assertion.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/integration/test_storage_rabbitmq/test.py Replaces duplicated direct-select polling loops with a shared polling wrapper built on the new helper.
tests/integration/test_storage_rabbitmq/test_shutdown.py Uses the new helper to wait for direct-select consumption to reach the expected row count.
tests/integration/test_storage_rabbitmq/__init__.py Introduces poll_direct_select_result helper implementing progress-based polling for direct selects.

Comment thread tests/integration/test_storage_rabbitmq/__init__.py
Track progress in `poll_direct_select_result` from each newly fetched batch instead of recounting rows from the accumulated result on every poll iteration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@clickhouse-gh

clickhouse-gh Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.40% 85.30% -0.10%
Functions 92.50% 92.50% +0.00%
Branches 77.60% 77.50% -0.10%

Changed lines: No C/C++ source files changed — skipping uncovered code analysis.

Newly covered by added/modified tests: 313 line(s), 49 function(s) across 104 file(s) · Details

Top files
  • src/Disks/IO/CachedOnDiskWriteBufferFromFile.cpp: 15 line(s)
  • src/AggregateFunctions/TimeSeries/AggregateFunctionTimeseriesLinearRegression.h: 14 line(s), 32 function(s)
  • src/Common/ZooKeeper/ZooKeeper.cpp: 11 line(s), 2 function(s)
  • src/AggregateFunctions/TimeSeries/AggregateFunctionTimeSeriesGroupArray.h: 10 line(s), 8 function(s)
  • src/Storages/StorageReplicatedMergeTree.cpp: 10 line(s)

Full report

Comment thread tests/integration/test_storage_rabbitmq/test.py
@pamarcos pamarcos added this pull request to the merge queue Jun 24, 2026
Merged via the queue into master with commit 30e7bbc Jun 24, 2026
168 checks passed
@pamarcos pamarcos deleted the fix-rabbitmq-slow-sanitizer-polling branch June 24, 2026 15:33
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants