Fix disk reach limit cannot transfer in bug.

This commit is contained in:
godyangfight 2023-09-21 02:10:14 +00:00 committed by ob-robot
parent 789419e6cf
commit 5e256552c2
4 changed files with 15 additions and 0 deletions

View File

@ -958,6 +958,8 @@ int ObStartCompleteMigrationTask::process()
LOG_WARN("failed to check all tablet ready", K(ret), KPC(ctx_));
} else if (OB_FAIL(wait_log_replay_to_max_minor_end_scn_())) {
LOG_WARN("failed to wait log replay to max minor end scn", K(ret), KPC(ctx_));
} else if (OB_FAIL(ObStorageHAUtils::check_disk_space())) {
LOG_WARN("failed to check disk space", K(ret), KPC(ctx_));
} else if (OB_FAIL(update_ls_migration_status_hold_())) {
LOG_WARN("failed to update ls migration status hold", K(ret), KPC(ctx_));
} else if (OB_FAIL(change_member_list_with_retry_())) {

View File

@ -330,6 +330,16 @@ int ObStorageHAUtils::check_is_primary_tenant(const uint64_t tenant_id, bool &is
return ret;
}
int ObStorageHAUtils::check_disk_space()
{
int ret = OB_SUCCESS;
const int64_t required_size = 0;
if (OB_FAIL(THE_IO_DEVICE->check_space_full(required_size))) {
LOG_WARN("failed to check is disk full, cannot transfer in", K(ret));
}
return ret;
}
bool ObTransferUtils::is_need_retry_error(const int err)
{
bool bool_ret = false;

View File

@ -45,6 +45,7 @@ public:
static int get_readable_scn_with_retry(share::SCN &readable_scn);
static int64_t get_rpc_timeout();
static int check_is_primary_tenant(const uint64_t tenant_id, bool &is_primary_tenant);
static int check_disk_space();
private:
static int check_merge_error_(const uint64_t tenant_id, common::ObISQLClient &sql_client);

View File

@ -2045,6 +2045,8 @@ int ObCheckStartTransferTabletsP::process()
ret = OB_DISK_ERROR;
STORAGE_LOG(ERROR, "observer has disk error, cannot restore", KR(ret),
"disk_health_status", device_health_status_to_str(dhs), K(disk_abnormal_time));
} else if (OB_FAIL(ObStorageHAUtils::check_disk_space())) {
LOG_WARN("failed to check disk space", K(ret), K(arg_));
} else if (OB_FAIL(check_start_transfer_out_tablets_())) {
LOG_WARN("failed to check start transfer out tablets", K(ret), K(arg_));
} else if (OB_FAIL(check_start_transfer_in_tablets_())) {