test: address flake in HeadRevisionDoesNotConsumeXID#3163
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.
| Benchmark suite | Current: ea8450c | Previous: f1ae3b8 | Ratio |
|---|---|---|---|
BenchmarkDatastoreDriver/cockroachdb-overlap-static/TestTuple/SnapshotReverseRead (github.com/authzed/spicedb/internal/datastore/benchmark) |
34167382 ns/op 174789 B/op 20200 allocs/op |
7776957 ns/op 172930 B/op 20196 allocs/op |
4.39 |
BenchmarkDatastoreDriver/cockroachdb-overlap-static/TestTuple/SnapshotReverseRead (github.com/authzed/spicedb/internal/datastore/benchmark) - ns/op |
34167382 ns/op |
7776957 ns/op |
4.39 |
BenchmarkDatastoreDriver/cockroachdb-overlap-insecure/TestTuple/SnapshotReverseRead (github.com/authzed/spicedb/internal/datastore/benchmark) |
33394895 ns/op 173775 B/op 20199 allocs/op |
7562874 ns/op 172825 B/op 20195 allocs/op |
4.42 |
BenchmarkDatastoreDriver/cockroachdb-overlap-insecure/TestTuple/SnapshotReverseRead (github.com/authzed/spicedb/internal/datastore/benchmark) - ns/op |
33394895 ns/op |
7562874 ns/op |
4.42 |
This comment was automatically generated by workflow using github-action-benchmark.
ef492e5 to
70a95ec
Compare
| after := nextXID() | ||
|
|
||
| require.Equal(t, before, after, "HeadRevision burned %d xid(s) over %d calls; expected 0", after-before, iterations) | ||
| // NOTE: we're expecting <= 1 here because there's a heartbeat goroutine that increments |
There was a problem hiding this comment.
before we do this relaxation, can we try something else? add cmd = append(cmd, "-c", "autovacuum=off") in line 66 inside RunPostgresForTestingWithCommitTimestamps. I assume that none of the existing tests depend on this vacuum process (@josephschorr ?)
my suspicion is that the vacuum processing is what is burning this extra XID.
There was a problem hiding this comment.
Let's try it - see if it does remove the flake
70a95ec to
b665427
Compare
b665427 to
ea8450c
Compare
Description
This test has been flaking: https://github.com/authzed/spicedb/actions/runs/27164166509/job/80187393099?pr=3154
Relaxing the assertion slightly should help.
Changes
Testing
Review.