From 5c35b99cf74a68f68cb68e04cbbe1b829e389f63 Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 12 Dec 2024 06:45:18 +0000 Subject: [PATCH] fix bug of not assign ddlkv in compaction --- src/storage/tablet/ob_tablet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storage/tablet/ob_tablet.cpp b/src/storage/tablet/ob_tablet.cpp index 6a1df6609..47dbaa3ad 100644 --- a/src/storage/tablet/ob_tablet.cpp +++ b/src/storage/tablet/ob_tablet.cpp @@ -1414,6 +1414,11 @@ int ObTablet::init_with_replace_members( LOG_WARN("tablet pointer handle is invalid", K(ret), K_(pointer_hdl), K_(pointer_hdl), K_(log_handler)); } else if (OB_FAIL(assign_memtables(old_tablet.memtables_, old_tablet.memtable_count_))) { LOG_WARN("fail to assign memtables", K(ret)); + } else if (OB_ISNULL(ddl_kvs_ = static_cast(allocator.alloc(sizeof(ObDDLKV *) * DDL_KV_ARRAY_SIZE)))) { + ret = OB_ALLOCATE_MEMORY_FAILED; + LOG_WARN("failed to allocate memory for ddl_kvs_", K(ret), KP(ddl_kvs_)); + } else if (OB_FAIL(assign_ddl_kvs(old_tablet.ddl_kvs_, old_tablet.ddl_kv_count_))) { + LOG_WARN("fail to assign ddl kvs", K(ret), KP(old_tablet.ddl_kvs_), K(old_tablet.ddl_kv_count_)); } else if (OB_FAIL(old_tablet.fetch_table_store(table_store_wrapper))) { LOG_WARN("fail to fetch table store", K(ret), K(old_tablet)); } else if (OB_FAIL(table_store_wrapper.get_member(old_table_store))) {