-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
75969: backupccl: breakup the txn that inserts stats during cluster restore r=stevendanna a=adityamaru We have seen instances of restores with hundreds of tables getting stuck on inserting the backed up table stats into the system.table_stats table on the restoring cluster. Previously, we would issue insert statements for each table stat row in a single, long-running txn. If this txn were to be retried a few times, we would observe intent buildup on the system.table_stats ranges. Once these intents exceeded the `max_intent_bytes` on the cluster, every subsequent txn retry would fall back to the much more expensive ranged intent resolution. The only remedy at this point would be to delete the BACKUP-STATISTICS file from the bucket where the backup resides, and restore the tables with no stats, relying on the AUTO STATS job to rebuild them gradually. This change "batches" the insertion of the table stats to prevent the above situation. Fixes: #69207 Release note: None Co-authored-by: Aditya Maru <[email protected]>
- Loading branch information
Showing
2 changed files
with
121 additions
and
14 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