fix empty aux tablet info core issue

This commit is contained in:
hiddenbomb 2023-11-14 07:14:48 +00:00 committed by ob-robot
parent 9c6aad3cc9
commit 9eb17fa1e9
2 changed files with 7 additions and 17 deletions

View File

@ -441,8 +441,14 @@ int ObStorageMetaValue::process_aux_tablet_info(
pos = 0; // reset pos
char *tmp_buf = nullptr;
const common::ObString &str = dump_kv.v_.user_data_;
if (OB_FAIL(aux_tablet_info.deserialize(str.ptr(), str.length(), pos))) {
if (str.empty()) {
// keep aux tablet info empty
aux_tablet_info.set_default_value();
} else if (OB_FAIL(aux_tablet_info.deserialize(str.ptr(), str.length(), pos))) {
LOG_WARN("fail to deserialize aux tablet info", K(ret), K(str));
}
if (OB_FAIL(ret)) {
} else if (OB_ISNULL(tmp_buf = static_cast<char *>(allocator.alloc(aux_tablet_info.get_deep_copy_size())))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("fail to allocate buffer", K(ret), "deep_copy_size", aux_tablet_info.get_deep_copy_size());

View File

@ -686,22 +686,6 @@ private:
mds::MdsTableHandle &mds_table,
bool not_exist_create = false) const;
int build_mds_data(
common::ObArenaAllocator &allocator,
const share::ObTabletAutoincSeq &auto_inc_seq,
const ObTabletTxMultiSourceDataUnit &tx_data,
const ObTabletBindingInfo &ddl_data,
const compaction::ObMediumCompactionInfoList &info_list);
int build_tablet_status(
common::ObArenaAllocator &allocator,
const ObTabletTxMultiSourceDataUnit &tx_data);
int build_aux_tablet_info(
common::ObArenaAllocator &allocator,
const ObTabletTxMultiSourceDataUnit &tx_data,
const ObTabletBindingInfo &ddl_data);
int build_auto_inc_seq(
common::ObArenaAllocator &allocator,
const share::ObTabletAutoincSeq &auto_inc_seq);
static int load_medium_info_list(
common::ObArenaAllocator &allocator,
const ObTabletComplexAddr<oceanbase::storage::ObTabletDumpedMediumInfo> &complex_addr,