Skip to content

Commit

Permalink
roachtest: Use rocksdb debug in inconsistency roachtest when poss…
Browse files Browse the repository at this point in the history
…ible

Fixes cockroachdb#55931.
Fixes cockroachdb#56173.

The `cockroach debug pebble db set` command did not exist in earlier releases,
so we use `cockroach debug rocksdb put` instead.
  • Loading branch information
nvanbenschoten committed Nov 2, 2020
1 parent 70b028d commit 1d7901b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/cmd/roachtest/inconsistency.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ func runInconsistency(ctx context.Context, t *test, c *cluster) {
// 0x120408001000180020002800322a0a10000000000000000000000000000000001a1266616b65207472616e73616374696f6e20312a004a00
// 0x120408001000180020002800322a0a10000000000000000000000000000000001a1266616b65207472616e73616374696f6e20322a004a00

c.Run(ctx, c.Node(1), "./cockroach debug pebble db set {store-dir} "+
debugCmd := "pebble db set {store-dir}"
if !t.IsBuildVersion("v21.1.0") {
debugCmd = "rocksdb put --hex --db={store-dir}"
}
c.Run(ctx, c.Node(1), fmt.Sprintf("./cockroach debug %s "+
"hex:016b1202000174786e2d0000000000000000000000000000000000 "+
"hex:12040800100018002000280032280a10000000000000000000000000000000001a1066616b65207472616e73616374696f6e2a004a00")
"hex:12040800100018002000280032280a10000000000000000000000000000000001a1066616b65207472616e73616374696f6e2a004a00",
debugCmd))

m := newMonitor(ctx, c)
c.Start(ctx, t, nodes)
Expand Down

0 comments on commit 1d7901b

Please sign in to comment.