Not report 4016 when there is no leader replica

This commit is contained in:
pe-99y
2023-11-17 07:10:56 +00:00
committed by ob-robot
parent f5b64d55eb
commit ec834c2946

View File

@ -95,8 +95,7 @@ int ObOptTabletLoc::assign_with_only_readable_replica(const ObObjectID &partitio
// all replicas are in blacklist, add leader replica forcibly. // all replicas are in blacklist, add leader replica forcibly.
if (OB_SUCC(ret) && 0 == replica_locations_.count()) { if (OB_SUCC(ret) && 0 == replica_locations_.count()) {
if (OB_INVALID_INDEX == leader_replica_idx) { if (OB_INVALID_INDEX == leader_replica_idx) {
ret = OB_ERR_UNEXPECTED; LOG_INFO("there is no leader replica");
LOG_WARN("unexpected invalid index", K(ret));
} else if (OB_FAIL(replica_locations_.push_back(ls_location.get_replica_locations().at(leader_replica_idx)))) { } else if (OB_FAIL(replica_locations_.push_back(ls_location.get_replica_locations().at(leader_replica_idx)))) {
LOG_WARN("failed to push back leader replica", K(ret)); LOG_WARN("failed to push back leader replica", K(ret));
} }