diff --git a/mittest/mtlenv/storage/test_ls_tablet_service.cpp b/mittest/mtlenv/storage/test_ls_tablet_service.cpp index 7384a36327..98d4b5a019 100644 --- a/mittest/mtlenv/storage/test_ls_tablet_service.cpp +++ b/mittest/mtlenv/storage/test_ls_tablet_service.cpp @@ -641,7 +641,7 @@ TEST_F(TestLSTabletService, test_get_ls_min_end_scn) share::SCN test_scn = share::SCN::min_scn(); share::SCN expect_scn; share::SCN orig_scn; - expect_scn.val_ = 1; + expect_scn.val_ = 0; share::SCN min_end_scn_from_latest_tablets = SCN::max_scn(); share::SCN min_end_scn_from_old_tablets = SCN::max_scn(); diff --git a/src/storage/meta_mem/ob_tenant_meta_mem_mgr.cpp b/src/storage/meta_mem/ob_tenant_meta_mem_mgr.cpp index b576f88266..8d989bb9bd 100755 --- a/src/storage/meta_mem/ob_tenant_meta_mem_mgr.cpp +++ b/src/storage/meta_mem/ob_tenant_meta_mem_mgr.cpp @@ -885,6 +885,8 @@ int ObTenantMetaMemMgr::get_min_end_scn_from_single_tablet(ObTablet *tablet, } else { // step 3 : if minor sstable do not exist, us max{tablet_clog_checkpoint, ls_clog_checkpoint} as end_scn end_scn = SCN::max(tablet->get_tablet_meta().clog_checkpoint_scn_, ls_checkpoint); + // the clog with scn of checkpoint scn may depend on the tx data with a commit scn of checkpoint scn + end_scn = SCN::max(SCN::scn_dec(end_scn), SCN::min_scn()); } if (end_scn < min_end_scn) {