From 3653285a16f7785e3833a48f84cc8f9dd660ff5f Mon Sep 17 00:00:00 2001 From: oceanoverflow Date: Thu, 9 Feb 2023 18:08:39 +0000 Subject: [PATCH] fix backup report -4002 --- src/storage/backup/ob_backup_utils.cpp | 9 ++++----- src/storage/backup/ob_backup_utils.h | 7 ++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/storage/backup/ob_backup_utils.cpp b/src/storage/backup/ob_backup_utils.cpp index c8e71c58cc..e44b417e07 100644 --- a/src/storage/backup/ob_backup_utils.cpp +++ b/src/storage/backup/ob_backup_utils.cpp @@ -658,9 +658,8 @@ int ObBackupTabletStat::mark_item_reused(const share::ObBackupDataType &backup_d ObMutexGuard guard(mutex_); ObBackupProviderItem item; ObBackupProviderItemType item_type = PROVIDER_ITEM_MACRO_ID; - blocksstable::MacroBlockId fake_macro_id; ObBackupMacroBlockId macro_id; - macro_id.macro_block_id_ = fake_macro_id; + macro_id.macro_block_id_ = ObBackupProviderItem::get_fake_macro_id_(); macro_id.logic_id_ = id_pair.logic_id_; if (IS_NOT_INIT) { ret = OB_NOT_INIT; @@ -1324,7 +1323,7 @@ DEFINE_GET_SERIALIZE_SIZE(ObBackupProviderItem) return size; } -ObITable::TableKey ObBackupProviderItem::get_fake_table_key_() const +ObITable::TableKey ObBackupProviderItem::get_fake_table_key_() { ObITable::TableKey table_key; table_key.tablet_id_ = ObTabletID(1); @@ -1334,12 +1333,12 @@ ObITable::TableKey ObBackupProviderItem::get_fake_table_key_() const return table_key; } -ObLogicMacroBlockId ObBackupProviderItem::get_fake_logic_id_() const +ObLogicMacroBlockId ObBackupProviderItem::get_fake_logic_id_() { return ObLogicMacroBlockId(0/*data_seq*/, 1/*logic_version*/, 1/*tablet_id*/); } -MacroBlockId ObBackupProviderItem::get_fake_macro_id_() const +MacroBlockId ObBackupProviderItem::get_fake_macro_id_() { return MacroBlockId(4096/*first_id*/, 0/*second_id*/, 0/*third_id*/); } diff --git a/src/storage/backup/ob_backup_utils.h b/src/storage/backup/ob_backup_utils.h index 962ff7456d..f198d01c9f 100644 --- a/src/storage/backup/ob_backup_utils.h +++ b/src/storage/backup/ob_backup_utils.h @@ -176,6 +176,7 @@ enum ObBackupProviderItemType { }; class ObBackupProviderItem { + friend class ObBackupTabletStat; public: ObBackupProviderItem(); virtual ~ObBackupProviderItem(); @@ -201,9 +202,9 @@ public: NEED_SERIALIZE_AND_DESERIALIZE; private: // for parallel external sort serialization restriction - ObITable::TableKey get_fake_table_key_() const; - blocksstable::ObLogicMacroBlockId get_fake_logic_id_() const; - blocksstable::MacroBlockId get_fake_macro_id_() const; + static ObITable::TableKey get_fake_table_key_(); + static blocksstable::ObLogicMacroBlockId get_fake_logic_id_(); + static blocksstable::MacroBlockId get_fake_macro_id_(); private: ObBackupProviderItemType item_type_;