You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
152142: backup: teach SHOW BACKUPS to use backup index r=msbutler a=kev-cao
`SHOW BACKUPS` previously would find all full backups by delimiting on the `data/` prefix and listing all objects from the root store. This was not very performant as while the data SSTs in all the backups would not be listed, all of the other files would be. This commit teaches `SHOW BACKUPS` to use the new backup index introduced in #150384 when listing backups. This method relies on listing the top-level contents in the `index/` directory and delimiting on `/`, which means only the required objects are listed.
This behavior is gated behind the `WITH INDEX` option that has been added to `SHOW BACKUPS`. This is because in 25.4, it is still possible to restore from backups made before the backup index was added. Since the new behavior relies entirely on the `index/`, we would miss any backups that do not have a corresponding index item created. To capture all backups in a collection, we'd need to list both from the `index/` and via the legacy path, which would be counterintuitive. Instead, we will instead rely on `WITH INDEX` until v26.1, at which point all restorable backups should have an index created for them. At that time, we will make `WITH INDEX` the default and use `WITH LEGACY LISTING` to list older backups.
Epic: CRDB-47942Fixes: #150328
Release note (general change): Added `WITH INDEX` option to `SHOW BACKUPS` for faster listing of 25.4+ backups.
Co-authored-by: Kevin Cao <[email protected]>
0 commit comments