[bugfix]: ignore -4018 while calling ObDDLKV::get_ddlmemtable.
This commit is contained in:
		| @ -1326,10 +1326,14 @@ int ObMultipleMerge::prepare_tables_from_iterator(ObTableStoreIterator &table_it | |||||||
|         ++memtable_cnt; |         ++memtable_cnt; | ||||||
|         if (table_ptr->is_direct_load_memtable()) { |         if (table_ptr->is_direct_load_memtable()) { | ||||||
|           ObDDLMemtable *ddl_memtable = nullptr; |           ObDDLMemtable *ddl_memtable = nullptr; | ||||||
|           if (OB_FAIL((static_cast<ObDDLKV*>(table_ptr)->get_ddl_memtable(0, ddl_memtable)))) { |           if (OB_FAIL((static_cast<ObDDLKV*>(table_ptr)->get_first_ddl_memtable(ddl_memtable)))) { | ||||||
|             LOG_WARN("fail to get ddl memtable but ignore the failure, return nullpoint", K(ret)); |             if (ret == OB_ENTRY_NOT_EXIST) { | ||||||
|           } else if (OB_ISNULL(ddl_memtable)) { |               // memtable is null, ignore the ddl_kv | ||||||
|  |               ret = OB_SUCCESS; | ||||||
|               continue; |               continue; | ||||||
|  |             } else { | ||||||
|  |               LOG_WARN("fail to get ddl memtable", K(ret)); | ||||||
|  |             } | ||||||
|           } else { |           } else { | ||||||
|             target_table_ptr = ddl_memtable; |             target_table_ptr = ddl_memtable; | ||||||
|           } |           } | ||||||
|  | |||||||
| @ -1011,6 +1011,11 @@ int ObDDLKV::get_ddl_memtable(const int64_t cg_idx, ObDDLMemtable *&ddl_memtable | |||||||
|   return ret; |   return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | int ObDDLKV::get_first_ddl_memtable(ObDDLMemtable *&ddl_memtable) | ||||||
|  | { | ||||||
|  |   return get_ddl_memtable(0, ddl_memtable); | ||||||
|  | } | ||||||
|  |  | ||||||
| int ObDDLKV::set_macro_block( | int ObDDLKV::set_macro_block( | ||||||
|     ObTablet &tablet, |     ObTablet &tablet, | ||||||
|     const ObDDLMacroBlock ¯o_block, |     const ObDDLMacroBlock ¯o_block, | ||||||
|  | |||||||
| @ -322,6 +322,7 @@ public: | |||||||
|   int64_t get_macro_block_cnt() const { return macro_block_count_; } |   int64_t get_macro_block_cnt() const { return macro_block_count_; } | ||||||
|   int create_ddl_memtable(ObTablet &tablet, const ObITable::TableKey &table_key, ObDDLMemtable *&ddl_memtable); |   int create_ddl_memtable(ObTablet &tablet, const ObITable::TableKey &table_key, ObDDLMemtable *&ddl_memtable); | ||||||
|   int get_ddl_memtable(const int64_t cg_idx, ObDDLMemtable *&ddl_memtable); |   int get_ddl_memtable(const int64_t cg_idx, ObDDLMemtable *&ddl_memtable); | ||||||
|  |   int get_first_ddl_memtable(ObDDLMemtable *&ddl_memtable); | ||||||
|   ObIArray<ObDDLMemtable *> &get_ddl_memtables() { return ddl_memtables_; } |   ObIArray<ObDDLMemtable *> &get_ddl_memtables() { return ddl_memtables_; } | ||||||
|   void inc_pending_cnt(); // used by ddl kv pending guard |   void inc_pending_cnt(); // used by ddl kv pending guard | ||||||
|   void dec_pending_cnt(); |   void dec_pending_cnt(); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Monk-Liu
					Monk-Liu