Files
turso/core
Pekka Enberg eaff2d135f Merge 'Fix database state going back in time after sync' from Nikita Sivukhin
This PR fixes sync engine bug which leads to the state of db going back
in time.
The mistake was made in the pull operation which before fetched
information about last commited changes to the remote separately. This
crates a problem since pull already works with fixed WAL updates
received earlier from remote - and this WAL update can be inconsistent
with more fresh value of last_change_id fetched from remote.
The fix is to use only WAL update and "extract" necessary information
from it. In order to do that sync now read meta sync table while pull
operation is in progress (at the moment when local changes are rolled
back and remote changes already applied) and do not use any external
source to consume that information.
Also, this PR fixes bug in the JS tursodatabase client and reset
statement in the finally block opposed to the previous approach to reset
statement at the beginning. The problem with previous approach were in
cases when client do not fully consumed the statement (e.g. abort
iteration and take only one row) in which case the statement will be
kept active and can prevent another write transaction from starting or
just occupy place as a read transaction.

Closes #3860
2025-10-29 17:53:45 +02:00
..
2025-10-20 14:47:47 -03:00
2025-09-24 18:06:55 -03:00
2025-10-29 16:24:05 +04:00
2025-06-30 10:01:03 +03:00
2025-10-29 16:24:05 +04:00
2025-10-21 21:10:58 +04:00
2025-10-16 01:22:54 -03:00
2025-01-28 14:55:38 -05:00
2025-10-29 16:24:05 +04:00
2025-09-30 14:52:59 +04:00
2025-10-09 19:00:40 +03:00
2025-09-22 16:37:31 +03:00
2025-06-30 09:54:13 +03:00
2025-09-23 14:22:02 -04:00