Fix ddl kv mgr get_rec_scn returns value less than checkpoint scn

This commit is contained in:
Hongqin-Li 2023-07-21 03:18:47 +00:00 committed by ob-robot
parent c5deec2236
commit 0db0105ce8

View File

@ -389,7 +389,7 @@ int ObTabletDDLKvMgr::get_rec_scn(SCN &rec_scn)
if (OB_SUCC(ret)) {
const ObTabletMeta &tablet_meta = tablet_handle.get_obj()->get_tablet_meta();
const SCN start_scn = get_start_scn();
if (start_scn.is_valid_and_not_min() && start_scn != tablet_meta.ddl_start_scn_) {
if (start_scn.is_valid_and_not_min() && start_scn > tablet_meta.ddl_start_scn_) {
// has a latest start log and not flushed to tablet meta, keep it
rec_scn = SCN::min(rec_scn, start_scn);
}