[FLINK-40294][table-planner] Instrument async scalar and table UDF calls with metrics (fork reference) - #10
Open
weiqingy wants to merge 1 commit into
Open
Conversation
…lls with metrics Extend the FLIP-485 UDF metrics to async scalar and table user-defined functions. The sampling decision and the start timestamp are captured at dispatch on the task thread; the elapsed time and any exceptional completion are recorded at completion on the callback thread, in the per-invocation DelegatingAsyncResultFuture and DelegatingAsyncTableResultFuture. Both writes happen before the completion callback is registered, establishing a happens-before edge to the callback thread; the histogram is synchronized and the exception counter is thread-safe. udfProcessingTime for an async function therefore spans the full dispatch to completion, not just the synchronous hand-off. As on the sync path, the instrumentation is emitted at code generation only when table.exec.udf-metric-enabled is true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork-internal PR for reviewer convenience. Not for merge here, and not yet opened upstream.
Part of the FLIP-485 stack (FLINK-38071). It will be opened against
apache:masteronce PR-2 merges.Based on
flink-38071-pr2-sync, so the diff shows only this step's changes: async scalar and table instrumentation. The sampling decision and start timestamp are captured at dispatch on the task thread; the elapsed time and any exceptional completion are recorded at completion on the callback thread, inDelegatingAsyncResultFutureandDelegatingAsyncTableResultFuture.Sub-task: FLINK-40294