Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions be/src/vec/exec/jni_connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ namespace doris::vectorized {
M(TypeIndex::Float64, Float64)

JniConnector::~JniConnector() {
Status st = close();
if (!st.ok()) {
// Ensure successful resource release
LOG(FATAL) << "Failed to release jni resource: " << st.to_string();
}
static_cast<void>(close());
}

Status JniConnector::open(RuntimeState* state, RuntimeProfile* profile) {
Expand Down Expand Up @@ -200,8 +196,9 @@ Status JniConnector::close() {
_closed = true;
jthrowable exc = (env)->ExceptionOccurred();
if (exc != nullptr) {
LOG(WARNING) << "Failed to release jni resource: "
<< JniUtil::GetJniExceptionMsg(env).to_string();
// Ensure successful resource release
LOG(FATAL) << "Failed to release jni resource: "
<< JniUtil::GetJniExceptionMsg(env).to_string();
}
}
return Status::OK();
Expand Down