[Fix] clear ddl commit flag in DDL start redo process
This commit is contained in:
@ -1073,6 +1073,8 @@ int ObDDLSSTableRedoWriter::start_ddl_redo(const ObITable::TableKey &table_key,
|
|||||||
} else if (FALSE_IT(set_start_scn(tmp_scn))) {
|
} else if (FALSE_IT(set_start_scn(tmp_scn))) {
|
||||||
} else if (OB_FAIL(ddl_kv_mgr_handle.get_obj()->register_to_tablet(get_start_scn(), ddl_kv_mgr_handle))) {
|
} else if (OB_FAIL(ddl_kv_mgr_handle.get_obj()->register_to_tablet(get_start_scn(), ddl_kv_mgr_handle))) {
|
||||||
LOG_WARN("register ddl kv mgr to tablet failed", K(ret), K(ls_id_), K(tablet_id_));
|
LOG_WARN("register ddl kv mgr to tablet failed", K(ret), K(ls_id_), K(tablet_id_));
|
||||||
|
} else {
|
||||||
|
ddl_kv_mgr_handle.get_obj()->reset_commit_success(); // releated issue: https://work.aone.alibaba-inc.com/issue/47686927
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -470,6 +470,12 @@ bool ObTabletDDLKvMgr::is_commit_success_unlock() const
|
|||||||
return success_start_scn_ > SCN::min_scn() && success_start_scn_ == start_scn_;
|
return success_start_scn_ > SCN::min_scn() && success_start_scn_ == start_scn_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObTabletDDLKvMgr::reset_commit_success()
|
||||||
|
{
|
||||||
|
ObLatchWGuard guard(lock_, ObLatchIds::TABLET_DDL_KV_MGR_LOCK);
|
||||||
|
success_start_scn_.set_min();
|
||||||
|
}
|
||||||
|
|
||||||
bool ObTabletDDLKvMgr::can_schedule_major_compaction(const ObTabletMeta &tablet_meta)
|
bool ObTabletDDLKvMgr::can_schedule_major_compaction(const ObTabletMeta &tablet_meta)
|
||||||
{
|
{
|
||||||
ObLatchRGuard guard(lock_, ObLatchIds::TABLET_DDL_KV_MGR_LOCK);
|
ObLatchRGuard guard(lock_, ObLatchIds::TABLET_DDL_KV_MGR_LOCK);
|
||||||
|
|||||||
@ -57,6 +57,7 @@ public:
|
|||||||
share::SCN get_commit_scn(const ObTabletMeta &tablet_meta);
|
share::SCN get_commit_scn(const ObTabletMeta &tablet_meta);
|
||||||
int set_commit_success(const share::SCN &start_scn);
|
int set_commit_success(const share::SCN &start_scn);
|
||||||
bool is_commit_success();
|
bool is_commit_success();
|
||||||
|
void reset_commit_success();
|
||||||
common::ObTabletID get_tablet_id() const { return tablet_id_; }
|
common::ObTabletID get_tablet_id() const { return tablet_id_; }
|
||||||
share::ObLSID get_ls_id() const { return ls_id_; }
|
share::ObLSID get_ls_id() const { return ls_id_; }
|
||||||
int cleanup();
|
int cleanup();
|
||||||
|
|||||||
Reference in New Issue
Block a user