fix consistent scn is between transfer prepare and commit and check tablet valid

This commit is contained in:
wxhwang
2023-07-18 07:12:27 +00:00
committed by ob-robot
parent a776cb6076
commit 10c62a726a
8 changed files with 67 additions and 62 deletions

View File

@ -1614,7 +1614,10 @@ int ObLSTabletService::update_tablet_restore_status(
} else if (restore_status == ObTabletRestoreStatus::UNDEFINED
&& OB_FALSE_IT((void)tablet->tablet_meta_.reset_transfer_table())) {
} else {
if (OB_FAIL(ObTabletPersister::persist_and_transform_tablet(*tablet, new_tablet_handle))) {
// TODO(jiahua.cjh) move check valid to tablet init after generate new version tablet.
if (OB_FAIL(tablet->check_valid())) {
LOG_WARN("failed to check tablet valid", K(ret), K(restore_status), KPC(tablet));
} else if (OB_FAIL(ObTabletPersister::persist_and_transform_tablet(*tablet, new_tablet_handle))) {
LOG_WARN("fail to persist and transform tablet", K(ret), KPC(tablet), K(new_tablet_handle));
} else if (FALSE_IT(time_guard.click("Persist"))) {
} else if (FALSE_IT(disk_addr = new_tablet_handle.get_obj()->tablet_addr_)) {