Commit Graph

19 Commits

Author SHA1 Message Date
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
Nikita Sivukhin
8d09e9d03d propagate push/pull thresholds to the python and golang SDK 2026-06-30 13:20:45 +02:00
Pekka Enberg
3fe9edec53 python: Add timeouts to prevent sync tests from hanging on Windows CI
The test_bootstrap_concurrency test hangs indefinitely on Windows because
multiprocessing.Barrier.wait() and Process.join() have no timeouts. Also
add a 30s deadline to the TursoServer startup wait loop and per-request
timeouts to requests.get().
2026-02-06 14:21:27 +02:00
Nikita Sivukhin
a70b4a6dd9 Merge branch 'main' into save-sync-configuration 2025-12-26 17:49:21 +04:00
Nikita Sivukhin
28094f4b0b fix python bindings 2025-12-26 17:22:34 +04:00
Nikita Sivukhin
8b04ce7235 rename partial_sync_opts to partial_sync_experimental for Python driver 2025-12-22 21:52:11 +04:00
Nikita Sivukhin
fc21324c61 fix test 2025-12-21 15:47:19 +04:00
Nikita Sivukhin
f94f38623d uvx ruff check --fix 2025-12-21 14:29:10 +04:00
Nikita Sivukhin
0270505210 fix exception type 2025-12-21 14:28:52 +04:00
Nikita Sivukhin
1393482f1f add concurrency test in python 2025-12-21 12:10:23 +04:00
Nikita Sivukhin
9326b0c6c0 fix tests 2025-12-19 13:24:26 +04:00
Nikita Sivukhin
9032c61e52 reformat python 2025-12-18 16:39:25 +04:00
Nikita Sivukhin
7fc026d0db add local mode for python and go tests 2025-12-18 16:25:29 +04:00
Nikita Sivukhin
5ab69bcf20 rename speculative load to prefetch (docs already uses this terminology) 2025-12-16 13:59:39 +04:00
Nikita Sivukhin
f409875c69 adjust python tests a little bit 2025-12-10 18:37:28 +04:00
Nikita Sivukhin
0c73e875eb fix assertion in python test 2025-12-10 18:23:44 +04:00
Nikita Sivukhin
aac3a699ce fix partial sync config after rebase 2025-12-09 16:01:12 +04:00
Nikita Sivukhin
7dd50abf2a format and restructure for sync package 2025-12-02 18:32:32 +04:00
Nikita Sivukhin
ae603000e1 implement simple turso-sync bindings for python 2025-12-02 17:18:46 +04:00