[Bug] Pulsar Function processing time doesn't get properly recorded for asynchronous functions #23705
Open
2 of 3 tasks
Labels
type/bug
The PR fixed a bug or issue reported a bug
Search before asking
Read release policy
Version
any released version
Minimal reproduce step
In the code, it can be seen that asynchronous functions don't get handled properly.
stats.processTimeEnd()
gets called immediately when the result is returned:pulsar/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
Lines 337 to 355 in 6fe8100
What did you expect to see?
asynchronous functions would also be handled
What did you see instead?
asynchronous functions have invalid processing time stats
Anything else?
The current processing metric for async functions includes the time for doing the async calls and the waiting time when the concurrency limit is reached. The metric is useful for this purpose.
It doesn't tell the actual end-to-completion processing time which contains the async processing time.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: