cambyzju commented on code in PR #32287:
URL: https://github.com/apache/doris/pull/32287#discussion_r1527967631
##########
be/src/vec/exprs/vexpr.cpp:
##########
@@ -542,9 +542,9 @@ void VExpr::close_function_context(VExprContext* context,
FunctionContext::Funct
if (_fn_context_index != -1) {
FunctionContext* fn_ctx = context->fn_context(_fn_context_index);
// close failed will make system unstable. dont swallow it.
- THROW_IF_ERROR(function->close(fn_ctx, FunctionContext::THREAD_LOCAL));
+ static_cast<void>(function->close(fn_ctx,
FunctionContext::THREAD_LOCAL));
if (scope == FunctionContext::FRAGMENT_LOCAL) {
- THROW_IF_ERROR(function->close(fn_ctx,
FunctionContext::FRAGMENT_LOCAL));
+ static_cast<void>(function->close(fn_ctx,
FunctionContext::FRAGMENT_LOCAL));
Review Comment:
这里同意 @HappenLee 的建议,强烈建议加上强注释:
1. 咱们不是解决问题,是临时规避问题;久而久之很容易被人再改回来,导致稳定性一直横跳;
2. 这种规避,往往很容易导致潜在的资源泄漏,C++不像JAVA,还是得自己来管理好资源,一旦泄漏排查代价非常大,建议加好日志打印;
3. 日志打印上,要么这里调用function
close失败的时候打印日志;要么下放到各function内部,自己close的时候打印日志;总之,至少注释里面描述清楚;
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]