Rebuild the [`PointerMap`] by iterating over all the rows in `self` and inserting them. Called when restoring from a snapshot after installing the pages, but after computing the row count, since snapshots do not save the pointer map..
(&mut self, blob_store: &dyn BlobStore)
| 2428 | /// but after computing the row count, |
| 2429 | /// since snapshots do not save the pointer map.. |
| 2430 | fn rebuild_pointer_map(&mut self, blob_store: &dyn BlobStore) -> PointerMap { |
| 2431 | // TODO(perf): Pre-allocate `PointerMap.map` with capacity `self.row_count`. |
| 2432 | // Alternatively, do this at the same time as `compute_row_count`. |
| 2433 | self.scan_rows(blob_store) |
| 2434 | .map(|row_ref| (row_ref.row_hash(), row_ref.pointer())) |
| 2435 | .collect() |
| 2436 | } |
| 2437 | |
| 2438 | /// Compute and store `self.row_count` and `self.blob_store_bytes` |
| 2439 | /// by iterating over all the rows in `self` and counting them. |