Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: some benchmarks fail in CI with crash in newPebbleIterator #97061

Closed
RaduBerinde opened this issue Feb 13, 2023 · 8 comments · Fixed by #97066
Closed

storage: some benchmarks fail in CI with crash in newPebbleIterator #97061

RaduBerinde opened this issue Feb 13, 2023 · 8 comments · Fixed by #97066
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. C-test-failure Broken test (automatically or manually discovered).

Comments

@RaduBerinde
Copy link
Member

RaduBerinde commented Feb 13, 2023

Some benchmarks in the CRDB repository generate fixtures in the package directory and reuse them if they already exist; these fixtures are .gitignored so they survive branch checkouts.

The reason for this is two-fold: re-running the benchmarks is much faster; but more importantly the results are more consistent since they run on exactly the same data.

There are two big problems:

  • this technique won't work with bazel where the test runs inside a sandbox; currently engineers who rely on these fixtures are using the deprecated Makefile
  • old fixtures remain on CI (I'm assuming from the non-bazel-based CI) where they can cause failures (even when tests run under bazel; see example below). These failures became more frequent recently when we bumped up the minimum supported version on master and are cleaning out deprecated compatibility code.

Examples: engineccl.BenchmarkTimeBoundIterate (currently disabled), batcheval.BenchmarkRefreshRange, many benchmarks in storage.

We need to:

  1. find a short-term fix to prevent these CI failures (could be ignoring these benchmarks for now)
  2. find a way to allow reuse of fixtures locally, even under bazel; this is already tracked under storage: MVCC benchmarks unreliable under Bazel #83599

An example of CI failure is here: https://teamcity.cockroachdb.com/viewLog.html?buildId=8689881&tab=buildResultsDiv&buildTypeId=Cockroach_Ci_Tests_Bench

The panic is "pebble: range keys require at least format major version .." which means that the store format is very old.

F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	GOROOT/src/runtime/panic.go:884 +0x212
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/pebble.(*DB).newIterInternal(0xc000908f00, 0x0, 0x0, 0xc00147edc8)
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/pebble/external/com_github_cockroachdb_pebble/db.go:943 +0x4d9
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/pebble.(*DB).NewIter(0x0?, 0xc000ab9980?)
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/pebble/external/com_github_cockroachdb_pebble/db.go:1251 +0x25
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/cockroach/pkg/storage.newPebbleIterator({0x5b6ff50, 0xc000908f00}, {0x0, {0xc000ab9980, 0x5, 0x8}, {0xc000ab99a0, 0x8, 0x8}, 0x0, ...}, ...)
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/cockroach/pkg/storage/pebble_iterator.go:90 +0xca
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/cockroach/pkg/storage.(*Pebble).NewMVCCIterator(0xc000478480?, 0x0?, {0x0, {0xc000ab9980, 0x5, 0x8}, {0xc000ab99a0, 0x8, 0x8}, 0x0, ...})
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/cockroach/pkg/storage/pebble.go:1273 +0x168
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/cockroach/pkg/storage.NewMVCCIncrementalIterator({0x5bb0b20, 0xc000478480}, {0x2, {0xc000ab9980, 0x5, 0x8}, {0xc000ab99a0, 0x8, 0x8}, {0x5, ...}, ...})
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/cockroach/pkg/storage/mvcc_incremental_iterator.go:212 +0x3a6
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval.refreshRange({0x5bb0b20?, 0xc000478480?}, {{0xc000ab9980, 0x5, 0x8}, {0xc000ab99a0, 0x8, 0x8}}, {0x5, 0x0, ...}, ...)
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval/cmd_refresh_range.go:75 +0x198
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval.RefreshRange({_, _}, {_, _}, {{0x5c01e30, 0xc0001149f0}, {{0x5, 0x1, 0x0}, 0x0, ...}, ...}, ...)
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval/cmd_refresh_range.go:58 +0x62f
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test.runRefreshRangeBenchmark.func1({0x5b775d0, 0xc000082068}, {0x5c0e510?, 0xc000478480}, {0x5c01e30, 0xc0001149f0}, {0xc000ab9980, 0x5, 0x8}, {0xc000ab99a0, ...}, ...)
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test/pkg/kv/kvserver/batcheval/cmd_refresh_range_bench_test.go:131 +0x285
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test.runRefreshRangeBenchmark(0xc000712240, 0xc001491700?, {{0x5, 0x0, 0x0}, {0x5, 0x1, 0x0}, {0xf4240, 0x40, ...}})
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test/pkg/kv/kvserver/batcheval/cmd_refresh_range_bench_test.go:161 +0x2b9
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test.BenchmarkRefreshRange.func1.1(0xc000712240?)
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test/pkg/kv/kvserver/batcheval/cmd_refresh_range_bench_test.go:106 +0xef
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !testing.(*B).runN(0xc000712240, 0x1)
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	GOROOT/src/testing/benchmark.go:193 +0x102
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !testing.(*B).run1.func1()
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	GOROOT/src/testing/benchmark.go:233 +0x59
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !created by testing.(*B).run1
F230213 18:26:27.799711 494 storage/pebble.go:1223 â‹® [T1,s?,pebble] 2 !	GOROOT/src/testing/benchmark.go:226 +0x9c

CC @jbowens

Jira issue: CRDB-24486

@RaduBerinde RaduBerinde added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. C-test-failure Broken test (automatically or manually discovered). labels Feb 13, 2023
@RaduBerinde RaduBerinde self-assigned this Feb 13, 2023
@RaduBerinde RaduBerinde changed the title storage: some benchmarks fail in CI with crash in newPebbleIterator storage: some tests and benchmarks fail in CI with crash in newPebbleIterator Feb 13, 2023
@RaduBerinde RaduBerinde changed the title storage: some tests and benchmarks fail in CI with crash in newPebbleIterator storage: some benchmarks fail in CI with crash in newPebbleIterator Feb 13, 2023
@RaduBerinde
Copy link
Member Author

Actually, it looks like we git clean everything, including .gitignored files on CI, so I may have misdiagnosed the failures I saw.

@RaduBerinde
Copy link
Member Author

The failures have a much simpler cause - the benchmarks set format versions that are too low.

@tbg
Copy link
Member

tbg commented Feb 14, 2023

Came here to report this crash1 in BenchmarkRefreshRange:

error during engine close: leaked iterators: current
I230214 11:28:36.289450 14 1@storage/pebble.go:1210 â‹® [T1,s?,pebble] 21  the server is terminating due to a fatal error (see the DEV channel for details)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22  error during engine close: leaked iterators: current
F230214 11:28:36.289479 14 storage/pebble.go:1210 ⋮ [T1,s?,pebble] 22 +‹1:›
F230214 11:28:36.289479 14 storage/pebble.go:1210 ⋮ [T1,s?,pebble] 22 +‹  000153:[key-\x8c\x00\x00\x00\x00\x00\x00J~\xaa\x09#976418,SET-key-\xf8\x0d\xf0R\x00\x00\x00\x00\x00\x00H\xa2t\x09#952036,SET]›
F230214 11:28:36.289479 14 storage/pebble.go:1210 ⋮ [T1,s?,pebble] 22 +‹  000154:[key-\xf8\x0d\xf0]\x00\x00\x00\x00\x00\x00L4\xbb\x09#998847,SET-key-\xf8\x0fB\x12\x00\x00\x00\x00\x00\x00J\x7f\xbd\x09#976473,SET]›
F230214 11:28:36.289479 14 storage/pebble.go:1210 ⋮ [T1,s?,pebble] 22 +‹4:›
F230214 11:28:36.289479 14 storage/pebble.go:1210 ⋮ [T1,s?,pebble] 22 +‹  000146:[key-\xf8\x0d\xf2\xc9\x00\x00\x00\x00\x00\x00E\xe1\x15\x09#915921,SET-key-\xf8\x0fB9\x00\x00\x00\x00\x00\x00E\x1b,\x09#905788,SET]›
F230214 11:28:36.289479 14 storage/pebble.go:1210 ⋮ [T1,s?,pebble] 22 +‹6:›
F230214 11:28:36.289479 14 storage/pebble.go:1210 ⋮ [T1,s?,pebble] 22 +‹  000148:[key-\x88\x00\x00\x00\x00\x00\x00\x08\xc4B\x09#0,SET-key-\xf8\x0fB?\x00\x00\x00\x00\x00\x00>}X\x09#0,SET]›
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !goroutine 14 [running]:
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/util/log.getStacks(0x0)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/util/log/get_stacks.go:25 +0x89
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/util/log.(*loggerT).outputLogEntry(0xc000724300, {{{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}}, 0x1743ad60801801c2, ...})
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/util/log/clog.go:260 +0xb8
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/util/log.logfDepthInternal({0x5b85c00, 0xc000c5d9b0}, 0x2, 0x4, 0x0, 0x0?, {0x49544d9, 0x1e}, {0xc00575a5c8, 0x1, ...})
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/util/log/channels.go:106 +0x645
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/util/log.logfDepth(...)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/util/log/channels.go:39
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/util/log.Fatalf(...)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/bazel-out/k8-fastbuild/bin/pkg/util/log/log_channels_generated.go:848
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/storage.(*Pebble).Close.func1({0x5b53720?, 0xc0006a0a08?})
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/storage/pebble.go:1210 +0x93
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/storage.(*Pebble).Close(0xc005876000)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/storage/pebble.go:1216 +0x71
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !panic({0x412b600, 0xc000aae050})
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	GOROOT/src/runtime/panic.go:884 +0x212
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/pebble.(*DB).newIterInternal(0xc000fb5400, 0x0, 0x0, 0xc00095a588)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/pebble/external/com_github_cockroachdb_pebble/db.go:943 +0x4d9
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/pebble.(*DB).NewIter(0x0?, 0xc00736eca0?)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/pebble/external/com_github_cockroachdb_pebble/db.go:1251 +0x25
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/storage.newPebbleIterator({0x5b7e500, 0xc000fb5400}, {0x0, {0xc00736eca0, 0x5, 0x8}, {0xc00736ecb0, 0x8, 0x8}, 0x0, ...}, ...)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/storage/pebble_iterator.go:90 +0xca
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/storage.(*Pebble).NewMVCCIterator(0xc005876000?, 0x0?, {0x0, {0xc00736eca0, 0x5, 0x8}, {0xc00736ecb0, 0x8, 0x8}, 0x0, ...})
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/storage/pebble.go:1260 +0x168
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/storage.NewMVCCIncrementalIterator({0x5bbf140, 0xc005876000}, {0x2, {0xc00736eca0, 0x5, 0x8}, {0xc00736ecb0, 0x8, 0x8}, {0x5, ...}, ...})
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/storage/mvcc_incremental_iterator.go:212 +0x3a6
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval.refreshRange({0x5bbf140?, 0xc005876000?}, {{0xc00736eca0, 0x5, 0x8}, {0xc00736ecb0, 0x8, 0x8}}, {0x5, 0x0, ...}, ...)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval/cmd_refresh_range.go:75 +0x198
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval.RefreshRange({_, _}, {_, _}, {{0x5c10530, 0xc00071c1b0}, {{0x5, 0x1, 0x0}, 0x0, ...}, ...}, ...)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval/cmd_refresh_range.go:58 +0x62f
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test.runRefreshRangeBenchmark.func1({0x5b85b90, 0xc000082068}, {0x5c1c958?, 0xc005876000}, {0x5c10530, 0xc00071c1b0}, {0xc00736eca0, 0x5, 0x8}, {0xc00736ecb0, ...}, ...)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test/pkg/kv/kvserver/batcheval/cmd_refresh_range_bench_test.go:131 +0x285
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test.runRefreshRangeBenchmark(0xc0005cd440, 0xc000594f00?, {{0x5, 0x0, 0x0}, {0x5, 0x1, 0x0}, {0xf4240, 0x40, ...}})
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test/pkg/kv/kvserver/batcheval/cmd_refresh_range_bench_test.go:161 +0x2b9
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test.BenchmarkRefreshRange.func1.1(0xc0005cd440?)
F230214 11:28:36.289479 14 storage/pebble.go:1210 â‹® [T1,s?,pebble] 22 !	github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval_test/pkg/kv/kvserver/batcheval/cmd_refresh_range_bench_test.go:106 +0xef

I looked at the test and it's not obviously leaking an iterator.

Footnotes

  1. https://teamcity.cockroachdb.com/repository/download/Cockroach_Ci_Tests_Bench/8702437:id/tmp/_tmp/e1ab32a24518a46d10d3b8d78552a36a/logBenchmarkRefreshRange2609426040/batchevaltest.log on f3ff417

@RaduBerinde
Copy link
Member Author

RaduBerinde commented Feb 14, 2023

The real panic is newIterInternal (format doesn't support range keys); the leaked iterator happens while unwinding.

Maybe you can review #97066 and bors it if it looks good.

@RaduBerinde
Copy link
Member Author

By the way, I was considering calling recover() in log.Fatalf code and printing the panic too, what do you think?

craig bot pushed a commit that referenced this issue Feb 14, 2023
97058: cloud: bump version to v22.2.4 r=ZhouXing19 a=ZhouXing19

Update the Docker image tag version in our Kubernetes config files to v22.2.4.

Epic: None
Release note: None

97060: roachtest: upgrade the `predecessor_version.json` for 22.2.4 r=ZhouXing19 a=ZhouXing19

Epic: None
Release note: None

97066: storage: never set a too-old format version r=RaduBerinde a=RaduBerinde

This change asserts that we never set a pebble FormatVersion that is
older than the minimum supported by our code.

Benchmarks that set a lower value are updated (and
BenchmarkTimeBoundIterate is reenabled). These benchmarks can fail
when the code exercises a feature like range keys that is not
supported by the older format.

Fixes #97061

Release note: None
Epic: none

Co-authored-by: Jane Xing <[email protected]>
Co-authored-by: Radu Berinde <[email protected]>
@craig craig bot closed this as completed in 9d24366 Feb 14, 2023
@RaduBerinde RaduBerinde reopened this Feb 14, 2023
@RaduBerinde
Copy link
Member Author

I still see a similar failure: https://teamcity.cockroachdb.com/viewLog.html?buildId=8704916&buildTypeId=Cockroach_Ci_Tests_Bench&tab=artifacts#%2Ftmp%2F_tmp%2Fe1ab32a24518a46d10d3b8d78552a36a;%2Ftmp%2F_tmp%2F99262b2ae388e806cec3034f997f74ca

Cannot reproduce locally. I'm back to the initial hypothesis that there are somehow old fixtures accessible in CI.

RaduBerinde added a commit to RaduBerinde/cockroach that referenced this issue Feb 14, 2023
This benchmark is sometimes failing in CI and I cannot reproduce
locally. The error is consistent with a leftover fixture from an older
version (which shouldn't happen because CI should be cleaning up the
repo).

This change adds the version to the fixture name so that this kind of
cross-version problem cannot occur. This is a good idea regardless of
the CI issue.

The logging around the fixture is also improved.

Informs cockroachdb#97061

Release note: None
Epic: none
@RaduBerinde
Copy link
Member Author

After talking to @rickystewart, it is possible that the directory would be reused on the bazel CI, because the bazel cache (and sandbox) is not cleared between builds.

RaduBerinde added a commit to RaduBerinde/cockroach that referenced this issue Feb 14, 2023
Some storage-related benchmarks leave fixtures around in `.gitignore`d
directories.

There is potential for fixtures from old versions to cause failures.
We are seeing some CI failures that would be explained by this (we're
not sure yet if it's possible).

In any case, it is better to include the version in the fixture name
to avid this (which can be a problem even locally).

The logging around the fixture location is also improved.

Informs cockroachdb#97061

Release note: None
Epic: none
craig bot pushed a commit that referenced this issue Feb 15, 2023
96295: changefeedccl: Rename and remove CDC functions r=miretskiy a=miretskiy

This PR renames and removes CDC specific functions, while maintaining backward compatability.

* `cdc_is_delete()` function removed.  It is replaced
  with `event_op()` function which returns a string describing
  the type of event.  If the changefeed is running with `diff`
  option, then this function returns `insert`, `update`, or
  `delete`.  If changefeed is running without the `diff` option,
  we can't tell an update from insert, so this function returns
  `upsert` or `delete`.
* `cdc_mvcc_timestamp()` function removed.  This information can be accessed 
    via cockroach standard system column `crdb_internal_mvcc_timestamp`.  
    The same timestamp column is avaiable in the previous row state 
    `(cdc_prev).crdb_internal_mvcc_timestamp`
* `cdc_updated_timestamp()` function renamed as `event_schema_timestamp()`

Fixes #92482
Epic: CRDB-17161

Release note (enterprise change): Deprecate and replace some of the changefeed specific functions made available in preview mode in 22.2
release.   While these functions are deprecated, old changefeed
transformations should continue to function properly.
Customers are encouraged to closely monitor their changefeeds
created during upgrade.  While effort was made to maintain backward
compatibility, the updated changefeed transformation may produce
slightly different output (different column names, etc).

97041: parser: add `QUERY` to `bare_label_keyword` r=ZhouXing19 a=ZhouXing19

As revealed by #84309, some keywords not added to `bare_label_keywords` in `sql.y` make the `SELECT ... <keyword>` statement error out, which is not compatible with postgres. This commit is to add the `QUERY` keyword per a support ticket. We're not adding the whole `unreserved_keyword` list here as having some of them in `bare_label_keyword`, such as `DAY`, brings `reduce` errors.

Postgres:

```
postgres=# select substring('stringstringstring',1,10) query;
   query
------------
 stringstri
(1 row)
```

CRDB:

```
root@localhost:26257/defaultdb> select substring('stringstringstring',1,10)  query;
invalid syntax: statement ignored: at or near "query": syntax error
SQLSTATE: 42601
DETAIL: source SQL:
select substring('stringstringstring',1,10)  query
                                             ^
```

informs #84309

Release Note(bug fix): fixed the syntax error for `SELECT ... QUERY` (without AS) statement.

97134: storage: include version in benchmark fixture directory r=RaduBerinde a=RaduBerinde

This benchmark is sometimes failing in CI and I cannot reproduce locally. The error is consistent with a leftover fixture from an older version (which shouldn't happen because CI should be cleaning up the repo).

This change adds the version to the fixture name so that this kind of cross-version problem cannot occur. This is a good idea regardless of the CI issue.

Informs #97061

Release note: None
Epic: none

97149: sql: add missing STORING clause in system.privileges user ID migration r=rafiss a=andyyang890

This patch fixes a discrepancy between the bootstrap schema and user ID
migration for the system.privileges table.

Part of #87079

Release note: None

Co-authored-by: Yevgeniy Miretskiy <[email protected]>
Co-authored-by: Jane Xing <[email protected]>
Co-authored-by: Radu Berinde <[email protected]>
Co-authored-by: Andy Yang <[email protected]>
@RaduBerinde
Copy link
Member Author

Adding the version in the fixture name fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. C-test-failure Broken test (automatically or manually discovered).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants