Skip to content

feat: capture more metrics in distributed_query - #1353

Merged
milenkovicm merged 2 commits into
apache:mainfrom
PhVHoang:feat/distributed_query_exec_more_metrics
Jan 2, 2026
Merged

feat: capture more metrics in distributed_query#1353
milenkovicm merged 2 commits into
apache:mainfrom
PhVHoang:feat/distributed_query_exec_more_metrics

Conversation

@PhVHoang

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #1252 .

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

Signed-off-by: Hoang Pham <a2k40pbc@gmail.com>

@milenkovicm milenkovicm 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.

i think this makes sense @PhVHoang thanks a lot!
One minor comment to investigate

.max_encoding_message_size(max_message_size)
.max_decoding_message_size(max_message_size);

let query_submit_time = std::time::Instant::now();

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.

just wonder if SuccessfulJob::queued_at could be used instead of this one? I'm not quite sure, wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @milenkovicm ,

I think this is a great catch. Using queued_at would be more accurate since it’s a server-side timestamp set by the scheduler when the job is queued. This avoids client-side clock skew and ensures the measurement doesn’t include any network latency.

Let me fix it.

Signed-off-by: Hoang Pham <a2k40pbc@gmail.com>
max_message_size: usize,
grpc_config: GrpcClientConfig,
metrics: Arc<ExecutionPlanMetricsSet>,
partition: usize,

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.

looks like there is single partition as the result of this exec, so not sure if we need partition here or we could use 0 later?

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.

Let's leave it as it is for now

@milenkovicm milenkovicm 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.

thanks @PhVHoang

@milenkovicm
milenkovicm merged commit 32f281a into apache:main Jan 2, 2026
27 checks passed
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.

Improve DistributedQueryExec adding job related metrics

2 participants