Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][pulsar-function]Pulsar Function processing time doesn't get properly recorded for asynchronous functions #23787

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

walkinggo
Copy link

Main Issue: #23705

Motivation

In the code, the asynchronous function is not handled properly. stats.processTimeEnd() is called immediately when the result is returned, but we should wait for the asynchronous task to complete before processing.

Modifications

Passed stats as a parameter into the function, and called stats.processTimeEnd() after the function call completes. Also, updated the corresponding test cases.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 26, 2024
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

This needs a different approach since there could be multiple messages in flight. The current duration calculation expects one-by-one messages handling.

@walkinggo
Copy link
Author

This needs a different approach since there could be multiple messages in flight. The current duration calculation expects one-by-one messages handling.

Sorry, I'm not quite sure I understand your point. Are you referring to the potential issue when multiple messages are being processed, where they might share the same stats variable, leading to the modification of the same processTimeStart variable after calling processTimeStart in ComponentStatsManager?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants