db: improve compaction test timeout observability#5279
db: improve compaction test timeout observability#5279RaduBerinde merged 2 commits intocockroachdb:masterfrom
Conversation
|
(pending merge of cockroachdb/datadriven#57) |
xxmplus
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 12 files reviewed, 1 unresolved discussion (waiting on @jbowens)
compaction_test.go line 986 at r1 (raw file):
defer func() { if t.Failed() { t.Logf("db log:\n%s\n", dbLog.String())
unrelated newbie question: do we print severity in logs in Pebble? or do we leave it to crdb to do that? I looked it up and it seems golang support structured error message via https://pkg.go.dev/log/slog.
RaduBerinde
left a comment
There was a problem hiding this comment.
TFTR!
Reviewable status: 0 of 12 files reviewed, 1 unresolved discussion (waiting on @jbowens and @xxmplus)
compaction_test.go line 986 at r1 (raw file):
Previously, xxmplus (Andy Xu) wrote…
unrelated newbie question: do we print severity in logs in Pebble? or do we leave it to crdb to do that? I looked it up and it seems golang support structured error message via https://pkg.go.dev/log/slog.
The default implementation (below) doesn't, and neither does this test-only InMemLogger. CRDB implements its own logger which does take into account the type of call (Info/Error/Fatal).
pebble/internal/base/logger.go
Line 32 in ac13f40
This grabs a recent commit that issues periodic logs during slow datadriven commands.
- set up a 1 minute timeout for any datadriven compactions; - print db logs on test failures; - upgrade datadriven to include a recent change to periodically log when a single command takes a long time. Informs cockroachdb#5277
fb5ba92 to
b7d4574
Compare
when a single command takes a long time.
Informs #5277