What I actually did was add a DISABLELOCKING option which when true will stop all locking in the DBLocking class, then I use a map of locks in my java library to grab a write lock for a given database (using the db name as the key) when doing any update. However there is one problem with this, when we release the lock at the end of the query, as I understand it the pending update list may not have been flushed. To fix this I'm going to have to release the lock after a server side forward, but is there any better way of doing this? 

I'm planning on submitting a pull request for the DISABLELOCKING feature soon.

Thanks,
Joe



On Tue, Nov 19, 2013 at 5:26 AM, Christian Grün <christian.gruen@gmail.com> wrote:
Hi Joe,

>> I'm going to try and build my own version of basex with the option to turn
>> off all locking. If I get something acceptable I will send a pull request
>> for it to be merged in.

did you already have to look at the code?

My impression is that we could quite easily add a QUERYLOCKING that,
when disabled, only considers manual locking flag, which can e.g. be
seat via the query:read-lock and query:write-lock options. But I dont’
know if that would help, as you mentioned you’d have to choose the
database dynamically.

You mentioned that you are expecting the database to be locked for 1-2
seconds. Maybe there is some chance to speed up your write operations?

Best,
Christian