fix ddl remote write when the tenant is standby

This commit is contained in:
simonjoylet
2023-02-09 16:38:59 +00:00
committed by ob-robot
parent 8efeef908d
commit ddca0b032d
4 changed files with 14 additions and 12 deletions

View File

@ -831,10 +831,11 @@ int ObDDLUtil::ddl_get_tablet(
bool ObDDLUtil::need_remote_write(const int ret_code)
{
return OB_NOT_MASTER == ret_code
|| OB_NOT_RUNNING == ret_code
|| OB_LS_LOCATION_LEADER_NOT_EXIST == ret_code
|| OB_EAGAIN == ret_code;
return ObTenantRole::PRIMARY_TENANT == MTL_GET_TENANT_ROLE()
&& (OB_NOT_MASTER == ret_code
|| OB_NOT_RUNNING == ret_code
|| OB_LS_LOCATION_LEADER_NOT_EXIST == ret_code
|| OB_EAGAIN == ret_code);
}
int ObDDLUtil::get_tablet_paxos_member_list(