Fix restore deleted tablet return 4002
This commit is contained in:
@ -116,8 +116,11 @@ ObTabletRestoreCtx::~ObTabletRestoreCtx()
|
|||||||
|
|
||||||
bool ObTabletRestoreCtx::is_valid() const
|
bool ObTabletRestoreCtx::is_valid() const
|
||||||
{
|
{
|
||||||
return tenant_id_ != OB_INVALID_ID && ls_id_.is_valid() && tablet_id_.is_valid() && tablet_handle_.is_valid()
|
return tenant_id_ != OB_INVALID_ID && ls_id_.is_valid() && tablet_id_.is_valid()
|
||||||
&& ObCopyTabletStatus::is_valid(status_) && OB_NOT_NULL(restore_base_info_)
|
&& ObCopyTabletStatus::is_valid(status_)
|
||||||
|
&& ((ObCopyTabletStatus::TABLET_EXIST == status_ && tablet_handle_.is_valid())
|
||||||
|
|| ObCopyTabletStatus::TABLET_NOT_EXIST == status_)
|
||||||
|
&& OB_NOT_NULL(restore_base_info_)
|
||||||
&& ObTabletRestoreAction::is_valid(action_)
|
&& ObTabletRestoreAction::is_valid(action_)
|
||||||
&& (!is_leader_ || OB_NOT_NULL(second_meta_index_store_))
|
&& (!is_leader_ || OB_NOT_NULL(second_meta_index_store_))
|
||||||
&& ObReplicaTypeCheck::is_replica_type_valid(replica_type_)
|
&& ObReplicaTypeCheck::is_replica_type_valid(replica_type_)
|
||||||
@ -1863,7 +1866,7 @@ int ObTabletRestoreDag::inner_reset_status_for_retry()
|
|||||||
} else {
|
} else {
|
||||||
LOG_INFO("start retry", KPC(this));
|
LOG_INFO("start retry", KPC(this));
|
||||||
result_mgr_.reuse();
|
result_mgr_.reuse();
|
||||||
if (OB_SSTABLE_NOT_EXIST == result && !tablet_restore_ctx_.is_leader_) {
|
if (!tablet_restore_ctx_.is_leader_) {
|
||||||
if (OB_FAIL(tablet_restore_ctx_.ha_table_info_mgr_->remove_tablet_table_info(tablet_restore_ctx_.tablet_id_))) {
|
if (OB_FAIL(tablet_restore_ctx_.ha_table_info_mgr_->remove_tablet_table_info(tablet_restore_ctx_.tablet_id_))) {
|
||||||
LOG_WARN("failed to remove tablet info", K(ret), K(tablet_restore_ctx_));
|
LOG_WARN("failed to remove tablet info", K(ret), K(tablet_restore_ctx_));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user