fix bug remote_execute with invalid schema_version,should ensure that the peer retry
This commit is contained in:
committed by
wangzelin.wzl
parent
afd6681d2b
commit
0806bb1efc
@ -193,9 +193,9 @@ int ObExprToOutfileRow::to_outfile_str(const ObExpr &expr, ObEvalCtx &ctx, ObDat
|
|||||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||||
LOG_WARN("allocate memory failed", K(ret), K(pos));
|
LOG_WARN("allocate memory failed", K(ret), K(pos));
|
||||||
} else {
|
} else {
|
||||||
MEMCPY(res_buf, buf, pos);
|
MEMCPY(res_buf, buf, pos);
|
||||||
expr_datum.set_string(res_buf, pos);
|
expr_datum.set_string(res_buf, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (OB_SIZE_OVERFLOW == ret
|
} while (OB_SIZE_OVERFLOW == ret
|
||||||
&& OB_SUCC(extend_buffer(*out_info, ctx.exec_ctx_.get_allocator())));
|
&& OB_SUCC(extend_buffer(*out_info, ctx.exec_ctx_.get_allocator())));
|
||||||
|
|||||||
@ -183,6 +183,10 @@ int ObRemoteBaseExecuteP<T>::base_before_process(int64_t tenant_schema_version,
|
|||||||
if (is_schema_error(ret)) {
|
if (is_schema_error(ret)) {
|
||||||
ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH; // 重写错误码,使得scheduler端能等待远端schema刷新并重试
|
ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH; // 重写错误码,使得scheduler端能等待远端schema刷新并重试
|
||||||
}
|
}
|
||||||
|
} else if (-1 == tenant_schema_version && ret == OB_TENANT_NOT_EXIST) {
|
||||||
|
// fix bug: https://work.aone.alibaba-inc.com/issue/45890226
|
||||||
|
// 控制端重启observer,导致租户schema没刷出来,发送过来的schema_version异常, 让对端重试
|
||||||
|
ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH;
|
||||||
} else {
|
} else {
|
||||||
if (OB_SCHEMA_ERROR == ret || OB_SCHEMA_EAGAIN == ret) {
|
if (OB_SCHEMA_ERROR == ret || OB_SCHEMA_EAGAIN == ret) {
|
||||||
ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH; // 针对OB_SCHEMA_ERROR 和OB_SCHEMA_EAGAIN这两个错误码,远程执行暂时先考虑重写,等待远端schema刷新并重试
|
ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH; // 针对OB_SCHEMA_ERROR 和OB_SCHEMA_EAGAIN这两个错误码,远程执行暂时先考虑重写,等待远端schema刷新并重试
|
||||||
|
|||||||
Reference in New Issue
Block a user