https://slatedb.io logo
😬 Seeing sporadic failures on:
# general
c
😬 Seeing sporadic failures on: test_sequence_tracker_not_ahead_of_last_l0_seq_when_flush_races_with_writes
a
I've got to walk the dog but will check when I get back
c
I suspect running the test in a loop will trigger it
(trying that now)
yep repro'd on main pretty easily
Copy code
running 1 test
2025-11-15T01:17:52.960752Z  INFO slatedb::db::builder: opening SlateDB database [path=tmp/test_sequence_tracker_flush_race, settings={"flush_interval":null,"wal_enabled":true,"manifest_poll_interval":"100ms","manifest_update_timeout":"300s","min_filter_keys":0,"filter_bits_per_key":10,"l0_sst_size_bytes":512,"l0_max_ssts":8,"max_unflushed_bytes":134217728,"compactor_options":null,"compression_codec":null,"object_store_cache_options":{"root_folder":null,"max_cache_size_bytes":17179869184,"part_size_bytes":4194304,"cache_puts":false,"preload_disk_cache_on_startup":null,"scan_interval":"3600s"},"garbage_collector_options":null,"default_ttl":null}]    

thread 'db::tests::test_sequence_tracker_not_ahead_of_last_l0_seq_when_flush_races_with_writes' (33092687) panicked at slatedb/src/db.rs:3318:9:
memtable was not frozen before flush
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
(took 14 iterations)
a
OK it's a test problem, not a code problem 🙂 the issue is that the test expects there to be an immutable memtable. But it seems like sometimes the l0 gets flushed before we even start checking! Not sure why L0 gets flushed because the immutable memtable is not full 🤔
OK if I comment out
flush_and_record
from
PollManifest
it works - so I think the race is that a poll manifest causes us to flush immutable memetables. That does seem a little weird to me, why do we want to flush tables whenever we poll a manifest? Anyway I'll work on fixing that race