Skip to content

Commit ffc86ea

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 156a7a4 commit ffc86ea

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

0 commit comments

Comments
 (0)