For the custom locking you linked to, do those lock names have to be declared in advance?
Yes, the lock names must be declared statically in the query, as they must be known at parse time (before the query is evaluated). Otherwise, we could as well lock a database once it is about to be updated, but this leads to race conditions and deadlocks.
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.
We are looking forward to your feedback and experiences. Christian
On Wed, Nov 6, 2013 at 11:13 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Joe,
Is there any way I can specify exactly what should be locked when going into an expression? Or better yet have basex lock nothing?
Unfortunately, the locking algorithms cannot be completely disabled, but we could think about providing such a mode. XQuery Locking Options [1] could then be used to manually control all lock operations. I’ll have some discussions about that with Jens.
From the documentation I thought that is what GLOBALLOCK would do, but it seems like even with that set to false it locks everything.
The documentation was a bit updated; I’ve updated the corresponding paragraph.
I'm worried having everything lock for every updating query is going to be a real performance bottleneck
Have you already tested if this is a real bottleneck?
Best, Christian
[1] http://docs.basex.org/wiki/Transaction_Management#XQuery_Locking_Options