[fix](jdbc catalog) fix jdbc-connector coredump as get env return nullptr#32217
[fix](jdbc catalog) fix jdbc-connector coredump as get env return nullptr#32217yiguolei merged 3 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. |
|
run buildall |
|
clang-tidy review says "All clean, 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: |
| JNIEnv* env; | ||
| RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env)); | ||
| JNIEnv* env = nullptr; | ||
| Status status = JniUtil::GetJNIEnv(&env); |
There was a problem hiding this comment.
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 |
|
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
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...