fix bug remote_execute with invalid schema_version,should ensure that the peer retry

This commit is contained in:
yishenglanlingzui
2022-11-14 05:43:46 +00:00
committed by wangzelin.wzl
parent afd6681d2b
commit 0806bb1efc
2 changed files with 7 additions and 3 deletions

View File

@ -183,6 +183,10 @@ int ObRemoteBaseExecuteP<T>::base_before_process(int64_t tenant_schema_version,
if (is_schema_error(ret)) {
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 {
if (OB_SCHEMA_ERROR == ret || OB_SCHEMA_EAGAIN == ret) {
ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH; // 针对OB_SCHEMA_ERROR 和OB_SCHEMA_EAGAIN这两个错误码,远程执行暂时先考虑重写,等待远端schema刷新并重试