Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT 2024.1][#21699] docdb: clear colocation_to_table before loa…
…ding from metadata protobuf Summary: Original commit: e404d68 / D34556 At remote bootstrap, tablet metadata was replaced with the downloaded super block. When loading the new super block to memory, colocation_to_table is not cleared. Also we set the colocation_to_table map with `emplace` method but it cannot overwrite the old data: ``` if (schema.has_colocation_id()) { colocation_to_table.emplace(schema.colocation_id(), table_info); } ``` If colocation_to_table has stale data, it can lead to corruption of SST files after a compaction because the old schema version could be used as the latest schema version and pack the unpacked rows with it, see `GetCompactionSchemaInfo` which gets the new_packing data. Jira: DB-10579 Test Plan: PgPackedRowTest.* Reviewers: sergei, rthallam Reviewed By: rthallam Subscribers: ybase Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D34605
- Loading branch information