Files
turso/bindings/python/tests
Glauber Costa a631e02736 bindings/python: make sync full_write atomic via temp file + rename
The sync engine's full_write handler wrote the replica metadata file in
place with open(path, 'wb'), so a concurrent reader (another connection
opening the same replica) could observe an empty or truncated file and fail
with 'meta must be initialized before open' or a deserialization error.
Write to a temp file and os.replace() it over the target, matching the
atomic write the JavaScript binding already does.

Tests: test_concurrent_open_existing_replica (fails on the previous
truncate-in-place write, passes now)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 15:13:15 -05:00
..
2025-12-26 17:22:34 +04:00
2026-02-26 04:42:57 -05:00