Skip to content

MSQ: Fix totalFiles tracking when querying data servers.#19104

Merged
gianm merged 1 commit intoapache:masterfrom
gianm:msq-fix-totalfiles
Mar 9, 2026
Merged

MSQ: Fix totalFiles tracking when querying data servers.#19104
gianm merged 1 commit intoapache:masterfrom
gianm:msq-fix-totalfiles

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Mar 6, 2026

When we query realtime servers, we gather up any handed-off segments into a new SegmentsInputSlice and reattach it. This would cause setTotalFiles to be called, which overwrites the previous value, often with zero.

This patch changes setTotalFiles to addTotalFiles, meaning that if any segments are handed-off and need to be fetched directly, the total file count will go up.

When we query realtime servers, we gather up any handed-off segments
into a new SegmentsInputSlice and reattach it. This would cause
setTotalFiles to be called, which overwrites the previous value,
often with zero.

This patch changes setTotalFiles to addTotalFiles, meaning that
if any segments are handed-off and need to be fetched directly,
the total file count will go up.
@github-actions github-actions bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Mar 6, 2026
@gianm gianm merged commit c252694 into apache:master Mar 9, 2026
86 of 89 checks passed
@gianm gianm deleted the msq-fix-totalfiles branch March 9, 2026 19:52
@github-actions github-actions bot added this to the 37.0.0 milestone Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants