Fix transfer src ls gc bug.
This commit is contained in:
parent
33a6f4973d
commit
58c6dc8cd4
@ -1740,11 +1740,14 @@ ERRSIM_DEF_DBL(errsim_module_error_percentage, OB_TENANT_PARAMETER, "0", "[0,100
|
||||
"Range: [0, 100] in percentage",
|
||||
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE))
|
||||
|
||||
|
||||
ERRSIM_DEF_BOOL(block_transfer_out_replay, OB_TENANT_PARAMETER, "False",
|
||||
"errsim to block transfer out clog replay",
|
||||
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||
|
||||
ERRSIM_DEF_BOOL(allow_transfer_backfill, OB_TENANT_PARAMETER, "True",
|
||||
"errsim to allow transfer backfill",
|
||||
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||
|
||||
// ttl
|
||||
DEF_STR_WITH_CHECKER(kv_ttl_duty_duration, OB_TENANT_PARAMETER, "", common::ObTTLDutyDurationChecker,
|
||||
"ttl background task working time duration"
|
||||
|
@ -362,7 +362,7 @@ int ObMigrationStatusHelper::check_transfer_dest_ls_status_for_ls_gc(
|
||||
ObLSHandle ls_handle;
|
||||
allow_gc = false;
|
||||
ObMigrationStatus dest_ls_status = ObMigrationStatus::OB_MIGRATION_STATUS_MAX;
|
||||
if (!transfer_ls_id.is_valid() || !tablet_id.is_valid() || !transfer_scn.is_valid()) {
|
||||
if (!transfer_ls_id.is_valid() || !tablet_id.is_valid() || !transfer_scn.is_valid() || transfer_scn.is_min()) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_WARN("ls id is invalid", K(ret), K(transfer_ls_id), K(tablet_id), K(transfer_scn));
|
||||
} else if (OB_ISNULL(ls_service = MTL(ObLSService*))) {
|
||||
@ -490,7 +490,7 @@ int ObMigrationStatusHelper::check_ls_transfer_tablet_(
|
||||
// do nothing
|
||||
} else if (OB_FAIL(check_transfer_dest_ls_status_for_ls_gc(
|
||||
user_data.transfer_ls_id_, tablet->get_tablet_meta().tablet_id_,
|
||||
tablet->get_tablet_meta().transfer_info_.transfer_start_scn_, need_wait_dest_ls_replay, allow_gc))) {
|
||||
user_data.transfer_scn_, need_wait_dest_ls_replay, allow_gc))) {
|
||||
LOG_WARN("failed to check ls transfer tablet", K(ret), K(ls), K(user_data));
|
||||
} else if (!allow_gc) {
|
||||
LOG_INFO("The ls is not allowed to be GC because it is also dependent on other ls", K(user_data),
|
||||
|
@ -327,21 +327,20 @@ int ObTransferWorkerMgr::process()
|
||||
int ret = OB_SUCCESS;
|
||||
bool is_exist = false;
|
||||
ObTransferBackfillTXParam param;
|
||||
bool allow_transfer_backfill = true;
|
||||
|
||||
#ifdef ERRSIM
|
||||
if (OB_SUCC(ret)) {
|
||||
ret = OB_E(EventTable::EN_CHECK_TRANSFER_TASK_EXSIT) OB_SUCCESS;
|
||||
if (OB_FAIL(ret)) {
|
||||
STORAGE_LOG(ERROR, "fake EN_CHECK_TRANSFER_TASK_EXSIT", K(ret));
|
||||
is_exist = true;
|
||||
ret = OB_SUCCESS;
|
||||
}
|
||||
}
|
||||
omt::ObTenantConfigGuard tenant_config(TENANT_CONF(MTL_ID()));
|
||||
if (tenant_config.is_valid()) {
|
||||
allow_transfer_backfill = tenant_config->allow_transfer_backfill;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (IS_NOT_INIT) {
|
||||
ret = OB_NOT_INIT;
|
||||
LOG_WARN("transfer work not init", K(ret));
|
||||
} else if (!allow_transfer_backfill) {
|
||||
LOG_INFO("do not allow transfer backfill, need check errsim config", K(allow_transfer_backfill));
|
||||
} else if (task_id_.is_valid() && OB_FAIL(check_task_exist_(task_id_, is_exist))) {
|
||||
LOG_WARN("failed to check task exist", K(ret), "ls_id", dest_ls_->get_ls_id(), K(*this));
|
||||
} else if (is_exist) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user