Skip to content

Commit 6fc84e2

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 0665464 commit 6fc84e2

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
@@ -2355,9 +2355,11 @@ func (d *BackupRestoreTestDriver) deleteUserTableSST(
23552355
ctx context.Context, l *logger.Logger, db *gosql.DB, collection *backupCollection,
23562356
) error {
23572357
var sstPath string
2358+
var startPretty, endPretty string
2359+
var sizeBytes, numRows int
23582360
if err := db.QueryRowContext(
23592361
ctx,
2360-
`SELECT path FROM
2362+
`SELECT path, start_pretty, end_pretty, size_bytes, rows FROM
23612363
(
23622364
SELECT row_number() OVER (), * FROM
23632365
[SHOW BACKUP FILES FROM LATEST IN $1]
@@ -2366,14 +2368,17 @@ func (d *BackupRestoreTestDriver) deleteUserTableSST(
23662368
ORDER BY row_number DESC
23672369
LIMIT 1`,
23682370
collection.uri(),
2369-
).Scan(&sstPath); err != nil {
2371+
).Scan(&sstPath, &startPretty, &endPretty, &sizeBytes, &numRows); err != nil {
23702372
return errors.Wrapf(err, "failed to get SST path from %s", collection.uri())
23712373
}
23722374
uri, err := url.Parse(collection.uri())
23732375
if err != nil {
23742376
return errors.Wrapf(err, "failed to parse backup collection URI %q", collection.uri())
23752377
}
2376-
l.Printf("deleting sst %s at %s", sstPath, uri)
2378+
l.Printf(
2379+
"deleting sst %s at %s: covering %d bytes and %d rows in [%s, %s)",
2380+
sstPath, uri, sizeBytes, numRows, startPretty, endPretty,
2381+
)
23772382
storage, err := cloud.ExternalStorageFromURI(
23782383
ctx,
23792384
collection.uri(),

0 commit comments

Comments
 (0)