w41ter commented on code in PR #33298: URL: https://github.com/apache/doris/pull/33298#discussion_r1554833389
########## be/src/cloud/pb_convert.cpp: ########## @@ -134,19 +137,55 @@ void doris_rowset_meta_to_cloud(RowsetMetaCloudPB* out, RowsetMetaPB&& in) { out->set_has_variant_type_in_schema(in.has_variant_type_in_schema()); } -RowsetMetaPB cloud_rowset_meta_to_doris(const RowsetMetaCloudPB& in) { +RowsetMetaPB cloud_rowset_meta_to_doris(const RowsetMetaCloudPB& in, + std::optional<SchemaCloudDictionary> dict) { RowsetMetaPB out; - cloud_rowset_meta_to_doris(&out, in); + cloud_rowset_meta_to_doris(&out, in, dict); return out; } -RowsetMetaPB cloud_rowset_meta_to_doris(RowsetMetaCloudPB&& in) { +RowsetMetaPB cloud_rowset_meta_to_doris(RowsetMetaCloudPB&& in, + std::optional<SchemaCloudDictionary> dict) { RowsetMetaPB out; - cloud_rowset_meta_to_doris(&out, std::move(in)); + cloud_rowset_meta_to_doris(&out, std::move(in), dict); return out; } -void cloud_rowset_meta_to_doris(RowsetMetaPB* out, const RowsetMetaCloudPB& in) { +static void fill_schema_with_dict(const RowsetMetaCloudPB& in, RowsetMetaPB* out, Review Comment: Move it into `MetaServiceImpl::get_rowset` so BE doesn't need to know the `SchemaCloudDictionary `. ########## cloud/src/recycler/recycler.cpp: ########## @@ -1151,13 +1151,19 @@ int InstanceRecycler::recycle_tablets(int64_t table_id, int64_t index_id, int64_ txn->remove(job_key_begin, job_key_end); LOG(WARNING) << "remove job kv, begin=" << hex(job_key_begin) << " end=" << hex(job_key_end); std::string schema_key_begin, schema_key_end; + std::string schema_dict_key_begin, schema_dict_key_end; if (partition_id <= 0) { // Delete schema kv of this index meta_schema_key({instance_id_, index_id, 0}, &schema_key_begin); meta_schema_key({instance_id_, index_id + 1, 0}, &schema_key_end); txn->remove(schema_key_begin, schema_key_end); LOG(WARNING) << "remove schema kv, begin=" << hex(schema_key_begin) << " end=" << hex(schema_key_end); + meta_schema_pb_dictionary_key({instance_id_, index_id}, &schema_dict_key_begin); + meta_schema_pb_dictionary_key({instance_id_, index_id + 1}, &schema_dict_key_end); + txn->remove(schema_dict_key_begin, schema_dict_key_end); Review Comment: There is only one key here, no need to remove the range. ########## cloud/src/meta-service/keys.cpp: ########## @@ -312,6 +305,12 @@ void meta_pending_delete_bitmap_key(const MetaPendingDeleteBitmapInfo& in, std:: encode_int64(std::get<1>(in), out); // table_id } +void meta_schema_pb_dictionary_key(const MetaSchemaPBDictionaryInfo& in, std::string* out) { Review Comment: please add encode/decode test, see cloud/test/keys_test.cpp for details. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org