On 4/7/16, sanhua.zh <sanhua.zh at foxmail.com> 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 bytes are locked.  So there is no performance impact
there.  I assume other operating systems are similar.

The locking protocol was designed in 2001 and cannot be changed
because that would be a compatibility break.
-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to