Closed seonWKim closed 2 months ago
@seonWKim We picked PRAGMA locking_mode = EXCLUSIVE
as the default because it's the fastest one. With NORMAL
(i guess same as NOLOCK there), the problem is that every transaction has to do a fcntl(), which is a round-trip to the kernel...
Oh I see. Will future implementation of transactions in limbo would not use fcntl()
then?
Yes, exactly. Limbo would not need fcntl()
in the transaction hot-path.
Question
Should we change current implementation of acquiring of lock when opening the database file?
Limbo implementation vs SQLite implementation
The impelmentations of
IO
'sopen_file
acquires the database file lock by default. As a result, we are not able to open multiple connections like belowThe current implementation of SQLite seems to not acquire lock while opening the DB(It seems to acquire the database lock on non-SELECT transactions etc)
Reference (SQLite Database System Design and Implementation (2nd Edition))