polarsignals / frostdb

❄️ Coolest database around 🧊 Embeddable column database written in Go.
Apache License 2.0
1.29k stars 65 forks source link

dst: add deterministic simulation test #865

Closed asubiotto closed 3 months ago

asubiotto commented 3 months ago

Running this test by itself is just a normal integration test. To run this test deterministically use POLARSIGNALS_RANDOM_SEED, the WASM build target, and github.com/asubiotto/go. For now, only the test is checked in to reduce the change surface area and is skipped if POLARSIGNALS_RANDOM_SEED is not specified.

There are still a couple of bugs to fix (#864 is the first PR here, and one of the commits in this PR contains another fix), so adding the running of this test to CI is still future work.

The idea is to merge this test as-is even though it is not final to provide a base to build on and fix bugs.

asubiotto commented 3 months ago

The failure was a test in the wal package that assumed the previous (buggy) nextTx = truncateTx + 1 behavior. I'm going to remove that fix in this PR to preserve the old behavior and look into the more comprehensive fix/testing changes as a followup.