[sqlite] Why SQLite lock 510 bytes for shared lock?

2016-04-08 Thread sanhua.zh
Good job! But I think lock a random byte from ?shared byterange? is enough to implement the shared file lock. Locking whole 510 bytes may take a lower performance. Why do you do so? ???:Richard Hippdrh at sqlite.org ???:SQLite mailing listsqlite-users at mailinglists.sqlite.org

[sqlite] Why SQLite lock 510 bytes for shared lock?

2016-04-08 Thread Richard Hipp
On 4/7/16, sanhua.zh wrote: > > But I think lock a random byte from ?shared byterange? is enough to > implement the shared file lock. Locking whole 510 bytes may take a lower > performance. Why do you do so? > On linux, the time needed to take a file lock is constant, regardless of how many