fix restore hang and tenant freeze fail in data_checkpoint flushing

This commit is contained in:
obdev
2023-05-17 15:11:21 +00:00
committed by ob-robot
parent 36608dd357
commit ffb515a326
7 changed files with 26 additions and 8 deletions

View File

@ -1505,7 +1505,7 @@ int ObLS::batch_tablet_freeze(const ObIArray<ObTabletID> &tablet_ids,
return ret;
}
int ObLS::advance_checkpoint_by_flush(SCN recycle_scn, const int64_t abs_timeout_ts)
int ObLS::advance_checkpoint_by_flush(SCN recycle_scn, const int64_t abs_timeout_ts, const bool is_tennat_freeze)
{
int ret = OB_SUCCESS;
int64_t read_lock = LSLOCKALL;
@ -1515,7 +1515,12 @@ int ObLS::advance_checkpoint_by_flush(SCN recycle_scn, const int64_t abs_timeout
ret = OB_TIMEOUT;
LOG_WARN("lock failed, please retry later", K(ret), K(ls_meta_));
} else {
if (is_tennat_freeze) {
ObDataCheckpoint::set_tenant_freeze();
LOG_INFO("set tenant_freeze", K(ls_meta_.ls_id_));
}
ret = checkpoint_executor_.advance_checkpoint_by_flush(recycle_scn);
ObDataCheckpoint::reset_tenant_freeze();
}
return ret;
}