Thank you for your reply. Unfortunately yes, this will be a serious performance issue, we will be serving 50+ requests per second from basex and to have all requests blocked for 1-2 seconds when a request requires content to be loaded into to the database is not acceptable. I would estimate around 10% of requests will require content to be added.
For the custom locking you linked to, do those lock names have to be declared in advance? Again, since we don't know the name of the database until the request comes in, we need a locking system which can lock on variable names. Currently we're using our own java library for this function.
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.
On Wed, Nov 6, 2013 at 11:13 AM, Christian Grün christian.gruen@gmail.comwrote:
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