Fix master compatible bug for transfer gc src ls

This commit is contained in:
godyangfight 2024-12-17 18:15:27 +00:00 committed by ob-robot
parent 5484e5ba74
commit a33470dd2b
2 changed files with 6 additions and 5 deletions

View File

@ -14,6 +14,7 @@
#include "ob_ls_transfer_info.h"
#include "common/ob_version_def.h"
#include "share/ob_cluster_version.h"
#include "storage/high_availability/ob_storage_ha_utils.h"
using namespace oceanbase;
using namespace share;
@ -407,9 +408,7 @@ int ObLSTransferMetaInfo::get_tablet_id_array(
bool ObLSTransferMetaInfo::is_in_compatible_status()
{
// TODO(@muwei.ym): validate version here
return (data_version_ < MOCK_CLUSTER_VERSION_4_2_3_0
|| data_version_ < CLUSTER_VERSION_4_3_2_0);
return !ObTransferUtils::enable_transfer_dml_ctrl(data_version_);
}
int ObLSTransferMetaInfo::check_transfer_tablet_is_same(

View File

@ -467,7 +467,8 @@ int ObMigrationStatusHelper::allow_transfer_src_ls_gc_(
} else if (ObMigrationStatus::OB_MIGRATION_STATUS_NONE != status
&& ObMigrationStatus::OB_MIGRATION_STATUS_MIGRATE_WAIT != status
&& ObMigrationStatus::OB_MIGRATION_STATUS_ADD_WAIT != status
&& ObMigrationStatus::OB_MIGRATION_STATUS_REBUILD_WAIT != status) {
&& ObMigrationStatus::OB_MIGRATION_STATUS_REBUILD_WAIT != status
&& ObMigrationStatus::OB_MIGRATION_STATUS_HOLD != status) {
allow_gc = true;
}
return ret;
@ -1018,7 +1019,8 @@ int ObMigrationStatusHelper::check_transfer_dest_ls_status_for_ls_gc_v1_(
} else if (ObMigrationStatus::OB_MIGRATION_STATUS_NONE != dest_ls_status
&& ObMigrationStatus::OB_MIGRATION_STATUS_MIGRATE_WAIT != dest_ls_status
&& ObMigrationStatus::OB_MIGRATION_STATUS_ADD_WAIT != dest_ls_status
&& ObMigrationStatus::OB_MIGRATION_STATUS_REBUILD_WAIT != dest_ls_status) {
&& ObMigrationStatus::OB_MIGRATION_STATUS_REBUILD_WAIT != dest_ls_status
&& ObMigrationStatus::OB_MIGRATION_STATUS_HOLD != dest_ls_status) {
allow_gc = true;
LOG_INFO("transfer dest ls check transfer status passed", K(ret), K(transfer_ls_id), K(dest_ls_status));
} else if (OB_FAIL(check_transfer_dest_tablet_for_ls_gc_v1_(dest_ls, tablet_id, transfer_scn, need_wait_dest_ls_replay, allow_gc))) {