-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backupccl: display up to 10 missing files in `SHOW BACKUP .. with che…
…ck_files` Previously, `SHOW BACKUP WITH check_files` displayed the first missing SST. This patch will display up to 100 missing SSTs. Further, this renames the misleading `approximateTablePhysicalSize` to `approximateSpanPhysicalSize`. Below I write out how physical table size is calculated: 1. Each range we backup maps to 1 to many spans (currently in the backup_manfest.files object). 2. 1 to many spans get written to an SST. No span will get written to multiple SSTs. 3. When backup created these spans, it tried really hard to split spans at table boundaries, so only one table’s data could be in a span, but a last minute table creation makes this near impossible, due to slow range splits. A big table will have many spans. 4. To compute the approximate logical size (called size_bytes in SHOW BACKUP) of each table, we sum the logical bytes over all it’s spans. We identify a table’s span by checking the table prefix of the first key in the span. See getTableSizes method) 5. To compute the physical size (file_bytes in SHOW BACKUP) of a span, compute the logical size of each SST by summing the logical bytes in the SST over its spans (see getLogicalSSTSize method), and attribute a portion of the physical SST size (returned from cloud storage) to a span using the formula: (sstPhysicalSize) * (logicalSpanSize) / (logicalSSTSize) = physicalSpanSize ( the approximateSpanTableSize method implements this). 6. To compute the physical size of a table, sum over the physical sizes the table’s spans Release note (sql change): SHOW BACKUP WITH check_files will display up to 10 missing SSTs.
- Loading branch information
Showing
2 changed files
with
81 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters