Not report 4016 when there is no leader replica

This commit is contained in:
obdev
2024-02-06 15:00:57 +00:00
committed by ob-robot
parent 8f9a50f512
commit 05e4df014b

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.
if (OB_SUCC(ret) && 0 == replica_locations_.count()) {
if (OB_INVALID_INDEX == leader_replica_idx) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected invalid index", K(ret));
LOG_INFO("there is no leader replica");
} 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));
}