Files
turso/core
Jussi Saurio a86a0e194d refactor/btree: cleanup write/delete/balancing states
Problem:

Currently `WriteState` "owns" the balancing state machine, even
though a separate `DeleteState` can also trigger balancing, which
results in awkward back-and-forth switching between `CursorState::Write`
and `CursorState::Delete` during balancing.

Fix:

1. Extract `balance_state` as a separate state machine, since its
state transitions are exactly the same regardless of whether an
insert or a delete triggered the balancing.
2. This allows to remove the different 'Balance-xxx' variants from
`WriteState`, as well as removing `WriteInfo` and `DeleteInfo`, as
those states become just simple enums now. Each of them now has a state
called `Balancing` which just delegates work to the balancing state
machine.
3. This further allows us to remove the awkward switching between
`CursorState::Delete` and `CursorState::Write` during a balance that
happens as a result of a deletion.
2025-08-06 13:37:35 +03:00
..
2025-08-02 20:06:05 -03:00
2025-07-28 14:49:07 -03:00
2025-07-16 14:02:56 +04:00
2025-08-05 22:26:19 -04:00
2025-07-14 11:20:49 +04:00
2025-08-05 13:34:51 +02:00
2025-06-23 19:52:13 +01:00
2025-06-30 10:01:03 +03:00
2025-07-31 20:51:43 +05:30
2025-01-28 14:55:38 -05:00
2025-06-23 19:52:13 +01:00
2025-07-30 13:34:49 +05:30
2025-01-28 14:55:38 -05:00
2025-08-05 16:24:49 -04:00
2025-06-23 19:52:13 +01:00
2025-07-30 17:33:59 -03:00
2025-06-30 09:54:13 +03:00
2025-08-04 20:18:44 +02:00