[BUGFIX] add check tenant is dropped when ls not exist in lob retry

This commit is contained in:
skylhd 2024-10-21 08:16:53 +00:00 committed by ob-robot
parent dc3b5d8018
commit dffbde1998

View File

@ -41,17 +41,31 @@ int ObLobRetryUtil::check_need_retry(ObLobAccessParam &param, const int error_co
ret = OB_KILLED_BY_THROTTLING;
LOG_INFO("[LOB RETRY] Retry is interrupted by worker check wait", K(ret), KR(ret), K(error_code), KR(error_code), K(retry_cnt), K(need_retry));
} else {
need_retry = true;
switch (error_code) {
case OB_LS_NOT_EXIST: { // check if tenant has been dropped when ls not exist
int tmp_ret = OB_SUCCESS;
bool is_dropped = false;
schema::ObMultiVersionSchemaService *schema_service = GCTX.schema_service_;
if (OB_ISNULL(schema_service)) {
tmp_ret = OB_ERR_UNEXPECTED;
LOG_WARN("schema_service is nullptr", "tmp_ret", tmp_ret);
} else if (OB_SUCCESS != (tmp_ret = schema_service->check_if_tenant_has_been_dropped(param.tenant_id_, is_dropped))) {
LOG_WARN("check if tenant has been dropped fail", "tmp_ret", tmp_ret);
} else if (is_dropped) {
ret = OB_TENANT_HAS_BEEN_DROPPED;
need_retry = false;
} // no need break
}
case OB_REPLICA_NOT_READABLE:
case OB_RPC_CONNECT_ERROR:
case OB_RPC_SEND_ERROR:
case OB_RPC_POST_ERROR:
case OB_NOT_MASTER:
case OB_NO_READABLE_REPLICA:
case OB_TABLET_NOT_EXIST:
case OB_LS_NOT_EXIST: {
need_retry = true;
if (OB_FAIL(ObLobLocationUtil::lob_refresh_location(param, error_code, retry_cnt))) {
case OB_TABLET_NOT_EXIST: {
if (!need_retry) {
} else if (OB_FAIL(ObLobLocationUtil::lob_refresh_location(param, error_code, retry_cnt))) {
LOG_WARN("fail to do refresh location", K(ret), K(error_code), K(retry_cnt), K(param));
need_retry = false;
}