Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: