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
????:2016?4?7?(??)?21:35
??:Re: [sqlite] Why SQLite lock 510 bytes for shared lock?


On 4/7/16, sanhua.zh sanhua.zh at foxmail.com wrote:  I found the code and the 
comment at [unixLock] of os_unix.h is different.  The comment say that a shared 
lock will lock a random byte from ?shared byte  range?(which is 510 bytes 
length). But the code show that it locks the whole  ?shared byte range?. The 
comment is legacy from the locking protocol used by Windows95, which lacks the 
ability to do a shared file lock. I'll fix the comment. -- D. Richard Hipp drh 
at sqlite.org _______________________________________________ sqlite-users 
mailing list sqlite-users at mailinglists.sqlite.org 
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to