cockroachdb / pebble

RocksDB/LevelDB inspired key-value database in Go
BSD 3-Clause "New" or "Revised" License
4.95k stars 458 forks source link

wal: TestConcurrentWritersWithManyRecords is flaky #4035

Open RaduBerinde opened 1 month ago

RaduBerinde commented 1 month ago
go test -tags invariants --exec 'stress -p 4' -timeout 0 -v ./wal -run TestConcurrentWritersWithManyRecords

=== RUN   TestConcurrentWritersWithManyRecords
    failover_writer_test.go:602: seed: 1728609608940745000
    failover_writer_test.go:716: 
                Error Trace:    /Users/radu/go/src/github.com/cockroachdb/pebble/wal/failover_writer_test.go:716
                                                        /Users/radu/go/src/github.com/cockroachdb/pebble/wal/failover_writer_test.go:720
                Error:          Not equal: 
                                expected: 0
                                actual  : 5373
                Test:           TestConcurrentWritersWithManyRecords

Jira issue: PEBBLE-275

RaduBerinde commented 1 month ago

CC @sumeerbhola - I made a pass at the code but there's too much I'm not familiar with; not sure what can break the assumption that all log files will contain all the records.

itsbilal commented 1 month ago

See past instance of this: https://github.com/cockroachdb/pebble/issues/3942

jbowens commented 1 month ago

Windows instance: https://github.com/cockroachdb/pebble/actions/runs/11369354676/job/31626591385?pr=4057