Skip to content

Commit 9f8d31c

Browse files
committed
roachtest: more logging on deleted sst in OR recovery
This commit adds more logging on the SST that is deleted in the OR recovery roachtest to determine exactly what backed up span and data was deleted. Epic: None Release note: None
1 parent 3164c07 commit 9f8d31c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pkg/cmd/roachtest/tests/mixed_version_backup.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,9 +2383,11 @@ func (d *BackupRestoreTestDriver) deleteUserTableSST(
23832383
ctx context.Context, l *logger.Logger, db *gosql.DB, collection *backupCollection,
23842384
) error {
23852385
var sstPath string
2386+
var startPretty, endPretty string
2387+
var sizeBytes, numRows int
23862388
if err := db.QueryRowContext(
23872389
ctx,
2388-
`SELECT path FROM
2390+
`SELECT path, start_pretty, end_pretty, size_bytes, rows FROM
23892391
(
23902392
SELECT row_number() OVER (), * FROM
23912393
[SHOW BACKUP FILES FROM LATEST IN $1]
@@ -2394,14 +2396,17 @@ func (d *BackupRestoreTestDriver) deleteUserTableSST(
23942396
ORDER BY row_number DESC
23952397
LIMIT 1`,
23962398
collection.uri(),
2397-
).Scan(&sstPath); err != nil {
2399+
).Scan(&sstPath, &startPretty, &endPretty, &sizeBytes, &numRows); err != nil {
23982400
return errors.Wrapf(err, "failed to get SST path from %s", collection.uri())
23992401
}
24002402
uri, err := url.Parse(collection.uri())
24012403
if err != nil {
24022404
return errors.Wrapf(err, "failed to parse backup collection URI %q", collection.uri())
24032405
}
2404-
l.Printf("deleting sst %s at %s", sstPath, uri)
2406+
l.Printf(
2407+
"deleting sst %s at %s: covering %d bytes and %d rows in [%s, %s)",
2408+
sstPath, uri, sizeBytes, numRows, startPretty, endPretty,
2409+
)
24052410
storage, err := cloud.ExternalStorageFromURI(
24062411
ctx,
24072412
collection.uri(),

0 commit comments

Comments
 (0)