From c259349b075283dc126634b7da74db0693abd38c Mon Sep 17 00:00:00 2001 From: obdev Date: Fri, 4 Nov 2022 04:35:58 +0000 Subject: [PATCH] fix add minor table to table store --- src/storage/compaction/ob_tenant_freeze_info_mgr.cpp | 2 +- src/storage/tablet/ob_tablet_table_store.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/compaction/ob_tenant_freeze_info_mgr.cpp b/src/storage/compaction/ob_tenant_freeze_info_mgr.cpp index 427e5718ec..c345c206dc 100644 --- a/src/storage/compaction/ob_tenant_freeze_info_mgr.cpp +++ b/src/storage/compaction/ob_tenant_freeze_info_mgr.cpp @@ -490,7 +490,7 @@ int ObTenantFreezeInfoMgr::diagnose_min_reserved_snapshot( ret = OB_SUCCESS; } } - snapshot_version = std::max(0L, snapshot_gc_ts_ - duration * 1000L * 1000L); + snapshot_version = std::max(0L, snapshot_gc_ts_ - duration * 1000L * 1000L * 1000L); snapshot_from_type = "undo_retention"; if (freeze_info.freeze_ts < snapshot_version) { snapshot_version = freeze_info.freeze_ts; diff --git a/src/storage/tablet/ob_tablet_table_store.cpp b/src/storage/tablet/ob_tablet_table_store.cpp index 7f66cc2a1c..19d6ac9ffc 100644 --- a/src/storage/tablet/ob_tablet_table_store.cpp +++ b/src/storage/tablet/ob_tablet_table_store.cpp @@ -799,11 +799,11 @@ int ObTabletTableStore::build_minor_tables( ObSSTable *new_sstable = static_cast(new_table); if (sstable->get_meta().get_basic_meta().max_merged_trans_version_ < new_sstable->get_meta().get_basic_meta().max_merged_trans_version_) { - need_add = true; + need_add = false; LOG_INFO("new sstable max merge trans version not equal to old sstable, " "need add new sstable when table key is same", KPC(sstable), KPC(new_sstable)); } else { - need_add = false; + need_add = true; // just keep old sstable } } else if (ObTableStoreUtil::check_include_by_log_ts_range(*new_table, *table)) { LOG_DEBUG("table purged", K(*new_table), K(*table)); -- GitLab