Files
turso/core
Pekka Enberg 418fc90f8a Merge 'core/storage: Cache schema cookie in Pager' from Pekka Enberg
Every transaction was reading page 1 from the WAL to check the schema
cookie in op_transaction, causing unnecessary WAL lookups.
This commit caches the schema_cookie in Pager as AtomicU64, similar to
how page_size and reserved_space are already cached. The cache is
updated when the header is read/modified and invalidated in
begin_read_tx() when WAL changes are detected from other connections.
This matches SQLite's approach of caching frequently accessed header
fields to avoid repeated page 1 reads. Improves write throughput by 5%
in our benchmarks.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3727
2025-10-23 14:00:27 +03:00
..
2025-10-20 14:47:47 -03:00
2025-09-24 18:06:55 -03:00
2025-06-30 10:01:03 +03:00
2025-10-21 21:10:58 +04:00
2025-10-16 01:22:54 -03:00
2025-10-07 16:22:20 -04:00
2025-01-28 14:55:38 -05: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