mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 10:41:12 +00:00
Update the tablet metadata save and read methods to work with tablet maps of co-located tables. The new function colocated_tablet_map_to_mutation is used to generate a mutation of a co-located table to system.tablets. It creates a static row with the base_table column set with the base table id. The function save_tablet_metadata is updated to use this function for co-located tables. When reading tablet metadata from the table, we handle the new case of reading a co-located table. We store the co-located tables relationships in the tablet_metadata_builder's `colocated_tables` map, and process it in on_end_of_stream. The reason we defer the processing is that we want to set all normal tablet maps first, to ensure the base tablet map is found when we process a co-located table.