mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-19 16:14:21 +01:00
For the time being, we still assume that the row versions vector is *nearly* sorted, so we just perform a linear reverse search and insert the version at an appropriate place. During concurrency tests, the error was at most 1 offset, and as long as we empirically prove it to be below a reasonable constant, we're fine. Otherwise we should consider switching to either a data structure that keeps elements ordered, or at least a list that gives us constant insertion.