diff --git a/src/storage/high_availability/ob_rebuild_service.cpp b/src/storage/high_availability/ob_rebuild_service.cpp index 7d3a1913c5..bc50fec7a1 100644 --- a/src/storage/high_availability/ob_rebuild_service.cpp +++ b/src/storage/high_availability/ob_rebuild_service.cpp @@ -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)); diff --git a/src/storage/high_availability/ob_storage_ha_struct.cpp b/src/storage/high_availability/ob_storage_ha_struct.cpp index d58cc00a04..0bbad31fed 100644 --- a/src/storage/high_availability/ob_storage_ha_struct.cpp +++ b/src/storage/high_availability/ob_storage_ha_struct.cpp @@ -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;