set memtable_clog_checkpoint_scn before compare_and_swap_tablet
This commit is contained in:
@ -3240,12 +3240,12 @@ int ObLSTabletService::build_ha_tablet_new_table_store(
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_FAIL(ObTabletSlogHelper::write_create_tablet_slog(new_tablet_handle, disk_addr))) {
|
||||
LOG_WARN("fail to write update tablet slog", K(ret), K(new_tablet_handle), K(disk_addr));
|
||||
} else if (OB_FAIL(old_tablet->set_memtable_clog_checkpoint_scn(param.tablet_meta_))) {
|
||||
LOG_WARN("failed to set memtable clog checkpoint ts", K(ret), KPC(old_tablet), K(param));
|
||||
} else if (OB_FAIL(t3m->compare_and_swap_tablet(key, disk_addr, old_tablet_handle, new_tablet_handle))) {
|
||||
LOG_ERROR("failed to compare and swap tablet", K(ret), K(key), K(disk_addr));
|
||||
ob_usleep(1000 * 1000);
|
||||
ob_abort();
|
||||
} else if (OB_FAIL(old_tablet->set_memtable_clog_checkpoint_scn(param.tablet_meta_))) {
|
||||
LOG_WARN("failed to set memtable clog checkpoint ts", K(ret), KPC(old_tablet), K(param));
|
||||
} else {
|
||||
LOG_INFO("succeed to build ha tablet new table store", K(ret), K(key), K(disk_addr), K(param));
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ int ObStorageTableGuard::check_freeze_to_inc_write_ref(ObITable *table, bool &bo
|
||||
if (0 == write_ref) {
|
||||
SCN clog_checkpoint_scn;
|
||||
bool need_create_memtable = true;
|
||||
const SCN migration_clog_checkpoint_scn = static_cast<memtable::ObMemtable *>(memtable)->get_migration_clog_checkpoint_scn();
|
||||
SCN migration_clog_checkpoint_scn;
|
||||
ObIMemtableMgr *memtable_mgr = tablet_->get_memtable_mgr();
|
||||
|
||||
if (OB_ISNULL(memtable_mgr)) {
|
||||
@ -325,6 +325,7 @@ int ObStorageTableGuard::check_freeze_to_inc_write_ref(ObITable *table, bool &bo
|
||||
LOG_WARN("memtable mgr is null", K(ret), K(bool_ret), K(ls_id), K(tablet_id), KP(memtable_mgr));
|
||||
} else if (OB_FAIL(memtable_mgr->get_newest_clog_checkpoint_scn(clog_checkpoint_scn))) {
|
||||
LOG_WARN("failed to get newest clog_checkpoint_scn", K(ret), K(ls_id), K(tablet_id), K(clog_checkpoint_scn));
|
||||
} else if (FALSE_IT(migration_clog_checkpoint_scn = static_cast<memtable::ObMemtable *>(memtable)->get_migration_clog_checkpoint_scn())) {
|
||||
} else if (for_replay_ && !migration_clog_checkpoint_scn.is_min()) {
|
||||
static_cast<memtable::ObMemtable *>(memtable)->resolve_right_boundary();
|
||||
if (replay_scn_ <= clog_checkpoint_scn) {
|
||||
|
||||
Reference in New Issue
Block a user