From f51a012b326b2aeddaa47d9f0174ea6a657e2408 Mon Sep 17 00:00:00 2001 From: obdev Date: Sat, 10 Feb 2024 01:20:13 +0000 Subject: [PATCH] update get cg sstable wrapper --- src/storage/column_store/ob_column_oriented_sstable.cpp | 2 ++ src/storage/tablet/ob_tablet.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/storage/column_store/ob_column_oriented_sstable.cpp b/src/storage/column_store/ob_column_oriented_sstable.cpp index 995a830f48..380894b5af 100644 --- a/src/storage/column_store/ob_column_oriented_sstable.cpp +++ b/src/storage/column_store/ob_column_oriented_sstable.cpp @@ -590,6 +590,8 @@ int ObCOSSTableV2::get_cg_sstable( false/*load_co_sstable*/, cg_wrapper.meta_handle_))) { LOG_WARN("failed to load sstable", K(ret), K(cg_wrapper)); + } else if (OB_FAIL(cg_wrapper.meta_handle_.get_sstable(cg_wrapper.sstable_))) { // should update cg sstable ptr in wrapper after load full cg sstable + LOG_WARN("failed to get sstable from meta handle", K(ret), K(cg_idx), K(cg_wrapper)); } return ret; } diff --git a/src/storage/tablet/ob_tablet.cpp b/src/storage/tablet/ob_tablet.cpp index ba4261d8f8..821091b3aa 100644 --- a/src/storage/tablet/ob_tablet.cpp +++ b/src/storage/tablet/ob_tablet.cpp @@ -4926,9 +4926,9 @@ int ObTablet::get_kept_snapshot_info( // snapshot info should smaller than snapshot on tablet snapshot_info.update_by_smaller_snapshot(ObStorageSnapshotInfo::SNAPSHOT_ON_TABLET, get_snapshot_version()); - const int64_t current_time = common::ObTimeUtility::fast_current_time() * 1000; // needs ns here. - if (current_time - snapshot_info.snapshot_ > 120 * 60 * 1000 * 1000L /*2 hour*/) { - if (REACH_TENANT_TIME_INTERVAL(10 * 1000 * 1000L /*10s*/)) { + const int64_t current_time = common::ObTimeUtility::fast_current_time(); + if (current_time - (snapshot_info.snapshot_ / 1000 /*use microsecond here*/) > 2_hour) { + if (REACH_TENANT_TIME_INTERVAL(10_s)) { LOG_INFO("tablet multi version start not advance for a long time", K(ret), "ls_id", get_tablet_meta().ls_id_, K(tablet_id), K(snapshot_info), K(old_min_reserved_snapshot), K(min_medium_snapshot),