mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-18 23:54:19 +01:00
Using insert() was a violation of our API, kind of, because inserts are not expected to be called twice on the same id. Instead, update or upsert should delete the version first, and that's what's done in this patch. At the same time, write-write conflict detection needed to be implemented, because we started hitting it with rollback(). Finally, garbage collection is modified to actually work and garbage-collect row versions. Without it, the number of tracked row versions very quickly goes out of hand.