Skip to content

Fix assertion in MergeTreePrefetchedReadPool::startPrefetches#96123

Merged
alexey-milovidov merged 3 commits intomasterfrom
fix-prefetched-read-pool-priority-assertion
Feb 7, 2026
Merged

Fix assertion in MergeTreePrefetchedReadPool::startPrefetches#96123
alexey-milovidov merged 3 commits intomasterfrom
fix-prefetched-read-pool-priority-assertion

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

The assertion checked that the top of prefetch_queue had a priority equal to highest_priority, but not all tasks are prefetched — some are skipped due to filesystem_prefetch_max_memory_usage or prefetch count limits. When the first tasks of all threads are skipped, the top of the queue has a higher priority value, violating the == assertion.

Closes #78287

Changelog category (leave one):

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

The assertion checked that the top of `prefetch_queue` had a priority
equal to `highest_priority`, but not all tasks are prefetched — some
are skipped due to `filesystem_prefetch_max_memory_usage` or prefetch
count limits. When the first tasks of all threads are skipped, the top
of the queue has a higher priority value, violating the `==` assertion.

Closes #78287

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh Bot commented Feb 5, 2026

Workflow [PR], commit [f78a789]

Summary:

job_name test_name status info comment
Stress test (arm_asan) failure
Segmentation fault (STID: 2704-3fd4) FAIL cidb, issue

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Feb 5, 2026
@nickitat nickitat self-assigned this Feb 6, 2026
Comment thread tests/queries/0_stateless/03823_prefetched_read_pool_priority_assertion.sql Outdated
Comment thread src/Storages/MergeTree/MergeTreePrefetchedReadPool.cpp Outdated
alexey-milovidov and others added 2 commits February 6, 2026 20:16
…assertion.sql

Co-authored-by: Nikita Taranov <nikita.taranov@clickhouse.com>
Co-authored-by: Nikita Taranov <nikita.taranov@clickhouse.com>
@alexey-milovidov alexey-milovidov merged commit 50bfb0b into master Feb 7, 2026
130 of 133 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-prefetched-read-pool-priority-assertion branch February 7, 2026 00:48
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 7, 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.

Assertion error on mergetree pool prefetch

3 participants