-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](jdbc catalog) fix jdbc-connector coredump as get env return nullptr #32217
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
Conversation
|
Thank you for your contribution to Apache Doris. |
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
TeamCity be ut coverage result: |
be/src/vec/exec/vjdbc_connector.cpp
Outdated
| JNIEnv* env; | ||
| RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env)); | ||
| JNIEnv* env = nullptr; | ||
| Status status = JniUtil::GetJNIEnv(&env); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are many APIs that call GetJNIEnv, and use RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env));
I think we should add check in GetJNIEnv if the result == nullptr, should return an error status.
TPC-H: Total hot run time: 38373 ms |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
TPC-H: Total hot run time: 38562 ms |
|
TeamCity be ut coverage result: |
This PR #32217 find a problem that may failed to get jni env. And it did a work around to avoid BE crash. This PR followup this issue, to avoid BE crash when doing `close()` of JniConnector if failed to get jni env. The `close()` method will return error when: 1. Failed to get jni env 2. Failed to release jni resource. This PR will ignore the first error, and still log fatal for second error
This PR apache#32217 find a problem that may failed to get jni env. And it did a work around to avoid BE crash. This PR followup this issue, to avoid BE crash when doing `close()` of JniConnector if failed to get jni env. The `close()` method will return error when: 1. Failed to get jni env 2. Failed to release jni resource. This PR will ignore the first error, and still log fatal for second error
This PR #32217 find a problem that may failed to get jni env. And it did a work around to avoid BE crash. This PR followup this issue, to avoid BE crash when doing `close()` of JniConnector if failed to get jni env. The `close()` method will return error when: 1. Failed to get jni env 2. Failed to release jni resource. This PR will ignore the first error, and still log fatal for second error
This PR apache#32217 find a problem that may failed to get jni env. And it did a work around to avoid BE crash. This PR followup this issue, to avoid BE crash when doing `close()` of JniConnector if failed to get jni env. The `close()` method will return error when: 1. Failed to get jni env 2. Failed to release jni resource. This PR will ignore the first error, and still log fatal for second error
Proposed changes
Issue Number: close #xxx
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...