Fix get_tablet_status using wrong interface

This commit is contained in:
godyangfight
2023-06-22 04:42:50 +00:00
committed by ob-robot
parent fcb06e0178
commit 98fd008517
2 changed files with 5 additions and 3 deletions

View File

@ -700,8 +700,9 @@ int ObRebuildService::check_can_rebuild_(
LOG_WARN("failed to get paxos member list and learner list", K(ret), KPC(ls));
} else if (ObLSRebuildType::TRANSFER == rebuild_ctx.type_
&& tenant_info.is_primary() && member_list.contains(self_addr)) {
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("ls cannot do rebuild", K(ret), K(rebuild_ctx), K(tenant_info), K(member_list));
//primary will has this condition
can_rebuild = false;
LOG_INFO("ls cannot do rebuild", K(rebuild_ctx), K(tenant_info), K(member_list));
} else if (OB_ISNULL(log_service = MTL(logservice::ObLogService*))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("log service should not be NULL", K(ret), KP(log_service));

View File

@ -354,6 +354,7 @@ int ObMigrationStatusHelper::check_ls_transfer_tablet_(const share::ObLSID &ls_i
ObTabletHandle tablet_handle;
ObTablet *tablet = NULL;
ObTabletCreateDeleteMdsUserData user_data;
bool unused_committed_flag = false;
while (OB_SUCC(ret)) {
if (OB_FAIL(tablet_iter.get_next_tablet(tablet_handle))) {
if (OB_ITER_END == ret) {
@ -371,7 +372,7 @@ int ObMigrationStatusHelper::check_ls_transfer_tablet_(const share::ObLSID &ls_i
LOG_WARN("tablet is NULL", KR(ret), K(ls_id));
} else if (tablet->is_ls_inner_tablet()) {
// do nothing
} else if (OB_FAIL(tablet->ObITabletMdsInterface::get_tablet_status(share::SCN::max_scn(), user_data, ObTabletCommon::DEFAULT_GET_TABLET_DURATION_US))) {
} else if (OB_FAIL(tablet->ObITabletMdsInterface::get_latest_tablet_status(user_data, unused_committed_flag))) {
if (OB_EMPTY_RESULT == ret) {
LOG_INFO("tablet_status is null, ls is allowed to be GC", KR(ret), "tablet_id", tablet->get_tablet_meta().tablet_id_, K(ls_id));
ret = OB_SUCCESS;