Skip to content

Fix support for Prometheus Remote Read protocol#93791

Merged
vitlibar merged 2 commits intoClickHouse:masterfrom
vitlibar:fix-prometheus-remote-read
Jan 12, 2026
Merged

Fix support for Prometheus Remote Read protocol#93791
vitlibar merged 2 commits intoClickHouse:masterfrom
vitlibar:fix-prometheus-remote-read

Conversation

@vitlibar
Copy link
Member

@vitlibar vitlibar commented Jan 9, 2026

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

Fix support for Prometheus Remote Read protocol

@clickhouse-gh
Copy link
Contributor

clickhouse-gh bot commented Jan 9, 2026

Workflow [PR], commit [33b3990]

Summary:

job_name test_name status info comment
Integration tests (amd_asan, db disk, old analyzer, 6/6) failure
test_kafka_bad_messages/test_mv_target_missing.py::test_missing_mv_transitive_target[generate_old_create_table_query] FAIL cidb, issue
Integration tests (arm_binary, distributed plan, 4/4) failure
test_storage_s3_queue/test_0.py::test_move_after_processing[another_bucket-S3Queue] FAIL cidb
Integration tests (amd_tsan, 3/6) error
test_backup_restore_on_cluster/test_disallow_concurrency.py::test_concurrent_backups_on_same_node FAIL cidb, issue
test_backup_restore_on_cluster/test_disallow_concurrency.py::test_concurrent_backups_on_different_nodes FAIL cidb, issue
test_backup_restore_on_cluster/test_disallow_concurrency.py::test_concurrent_restores_on_same_node FAIL cidb, issue
test_backup_restore_on_cluster/test_disallow_concurrency.py::test_concurrent_restores_on_different_node FAIL cidb, issue

@clickhouse-gh clickhouse-gh bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 9, 2026
@nikitamikhaylov nikitamikhaylov self-assigned this Jan 9, 2026
@vitlibar vitlibar requested a review from Copilot January 9, 2026 11:42
@vitlibar vitlibar marked this pull request as ready for review January 9, 2026 11:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes support for the Prometheus Remote Read protocol by addressing a buffer management issue in protobuf serialization and enhancing test coverage with a large dataset test.

Key changes:

  • Added nextIfAtEnd() call in ProtobufZeroCopyOutputStreamFromWriteBuffer::Next() to ensure buffer availability before writing
  • Introduced comprehensive test for Remote Read protocol with 75,000 data points
  • Refactored test setup to populate data once during cluster initialization rather than per-test

Reviewed changes

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

File Description
src/IO/Protobuf/ProtobufZeroCopyOutputStreamFromWriteBuffer.cpp Fixed buffer handling by ensuring next buffer chunk is available before writing
tests/integration/test_prometheus_protocols/test_write_read.py Added large dataset test, refactored data population to fixture, and renamed wait function for clarity

@nikitamikhaylov nikitamikhaylov added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Jan 9, 2026
@JTCunning JTCunning added the comp-promql Issues related to the PromQL support and TimeSeries table engine. label Jan 9, 2026
@vitlibar vitlibar enabled auto-merge January 12, 2026 12:19
@vitlibar vitlibar added this pull request to the merge queue Jan 12, 2026
Merged via the queue into ClickHouse:master with commit 0123cf3 Jan 12, 2026
128 of 132 checks passed
@vitlibar vitlibar deleted the fix-prometheus-remote-read branch January 12, 2026 12:33
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 12, 2026
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jan 12, 2026
robot-ch-test-poll2 added a commit that referenced this pull request Jan 12, 2026
Cherry pick #93791 to 25.8: Fix support for Prometheus Remote Read protocol
robot-ch-test-poll2 added a commit that referenced this pull request Jan 12, 2026
Cherry pick #93791 to 25.10: Fix support for Prometheus Remote Read protocol
robot-ch-test-poll2 added a commit that referenced this pull request Jan 12, 2026
Cherry pick #93791 to 25.11: Fix support for Prometheus Remote Read protocol
robot-ch-test-poll2 added a commit that referenced this pull request Jan 12, 2026
Cherry pick #93791 to 25.12: Fix support for Prometheus Remote Read protocol
nikitamikhaylov added a commit that referenced this pull request Jan 12, 2026
Backport #93791 to 25.12: Fix support for Prometheus Remote Read protocol
nikitamikhaylov added a commit that referenced this pull request Jan 12, 2026
Backport #93791 to 25.11: Fix support for Prometheus Remote Read protocol
nikitamikhaylov added a commit that referenced this pull request Jan 12, 2026
Backport #93791 to 25.10: Fix support for Prometheus Remote Read protocol
nikitamikhaylov added a commit that referenced this pull request Jan 12, 2026
Backport #93791 to 25.8: Fix support for Prometheus Remote Read protocol
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-promql Issues related to the PromQL support and TimeSeries table engine. pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-not-for-changelog This PR should not be mentioned in the changelog 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.

6 participants