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

Fix reading metrics will always get stuck in some cases #9538

Merged
merged 3 commits into from
Feb 10, 2021

Conversation

315157973
Copy link
Contributor

@315157973 315157973 commented Feb 9, 2021

Motivation

When javaInstanceRunnable has not been initialized yet, and client calls FunctionsStatsGenerator#generate, the NPE will be triggered.
Since only IOException is caught here, the client's request will be blocked all the time.

The following unit tests are affected and often fail to execute:
org.apache.pulsar.io.PulsarFunctionE2ETest#testReadCompactedSink

Modifications

Catch all exceptions

@315157973 315157973 changed the title Fix treading metrics will always get stuck in some cases Fix reading metrics will always get stuck in some cases Feb 9, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

This fix is okay for me

Be can we also fix the NPE ?
do you have a stacktrace ?

if we do not fix the NPE now we will forget about it
a NullPointerException is always a bug and must be fixed.

@315157973
Copy link
Contributor Author

This fix is okay for me

Be can we also fix the NPE ?
do you have a stacktrace ?

if we do not fix the NPE now we will forget about it
a NullPointerException is always a bug and must be fixed.

This situation will occur when Function startup is not completely finished.But at this time there is a client request.
Even if NPE is not thrown, other exceptions must be thrown.
The status received by the client is all 500, there is no big difference.

@sijie sijie added this to the 2.8.0 milestone Feb 9, 2021
@sijie sijie added area/function release/2.7.1 type/bug The PR fixed a bug or issue reported a bug labels Feb 9, 2021
@codelipenghui codelipenghui merged commit 456a19c into apache:master Feb 10, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Feb 18, 2021
codelipenghui pushed a commit that referenced this pull request Feb 18, 2021
@315157973 315157973 deleted the test-failed branch February 23, 2021 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/function cherry-picked/branch-2.7 Archived: 2.7 is end of life release/2.7.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants