提交 f0e7fcb8 编写于 作者: O obdev 提交者: ob-robot

fix inner sql retry memleak

上级 962180cc
...@@ -1953,7 +1953,10 @@ int ObInnerSQLConnection::execute_read(const int64_t cluster_id, ...@@ -1953,7 +1953,10 @@ int ObInnerSQLConnection::execute_read(const int64_t cluster_id,
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
auto function = [&]() { return execute_read_inner(cluster_id, tenant_id, sql, res, is_user_sql, sql_exec_addr); }; auto function = [&]() {
res.reuse();
return execute_read_inner(cluster_id, tenant_id, sql, res, is_user_sql, sql_exec_addr);
};
if (OB_FAIL(retry_while_no_tenant_resource(cluster_id, tenant_id, function))) { if (OB_FAIL(retry_while_no_tenant_resource(cluster_id, tenant_id, function))) {
LOG_WARN("execute_read failed", K(ret), K(cluster_id), K(tenant_id)); LOG_WARN("execute_read failed", K(ret), K(cluster_id), K(tenant_id));
} }
...@@ -1994,7 +1997,6 @@ int ObInnerSQLConnection::execute_read_inner(const int64_t cluster_id, ...@@ -1994,7 +1997,6 @@ int ObInnerSQLConnection::execute_read_inner(const int64_t cluster_id,
static_assert(ctx_size <= ObISQLClient::ReadResult::BUF_SIZE, "buffer not enough"); static_assert(ctx_size <= ObISQLClient::ReadResult::BUF_SIZE, "buffer not enough");
ObSqlQueryExecutor executor(sql); ObSqlQueryExecutor executor(sql);
const bool local_execute = is_local_execute(cluster_id, tenant_id); const bool local_execute = is_local_execute(cluster_id, tenant_id);
if (!inited_) { if (!inited_) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;
LOG_WARN("connection not inited", K(ret)); LOG_WARN("connection not inited", K(ret));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册