mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-30 11:12:58 +00:00
The property defers in-tx watermark updates until commit, so an in-flight transaction can consume a CYCLE wrap value (and further post-wrap values) without moving the shared watermark. A later autocommit nextval then observes min_value + k*increment against the stale pre-wrap watermark, but is_cycle_wrap only recognized a wrap landing exactly on min_value, so correct engine behavior (e.g. 19 -> 1 -> 4 with increment=3, max=19) was misreported as backwards movement. Accept the whole post-wrap grid when the watermark sits in the last pre-wrap slot, where the next emission must wrap; a backward step with the watermark anywhere else still fails the property. Tests: SEED=18353849629441010489 ./target/release/turso_whopper --mode fast --reopen-probability 0.01 --enable-mvcc --allocation-fault-probability 0.01 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Turso Testing
Testing Extensions
When adding tests for extensions, please follow these guidelines:
- Tests that verify the internal logic or behavior of a particular extension should go into
cli_tests/extensions.py. - Tests that verify how extensions interact with the database engine, such as virtual table handling, should be written
in TCL (see
vtab.testas an example).
To check which extensions are available in TCL, or to add a new one, refer to the tester.tcl file and look at the extension_map.