3 ms·
Similar to how the upcoming WAL2 works in SQLite, could do it atomically or "concurrent safe" like: - Main count file. - 2 "Append" files. ====== - Append '
by geenat 4y ago
Similar to how the upcoming WAL2 works in SQLite, could do it atomically or "concurrent safe" like:
- Main count file.
- 2 "Append" files.
======
- Append 'a' to append file 1.
- After some time, swap append file 1 with 2.
- Count up 'a' in non-active append file 1, add it to main count.
Then just repeat, swapping append files.