Hi Srini,
in both cases, using the latest stable snapshot of BaseX 7.5 [1] may give you better results: first of all, updates have been sped up in this version; next, it provides a DBLOCKING flag in the .basex configuration file [2], which addresses your second problem, and which can be set to true in order to activate database locking. Note, however, that this flag is still experimental, which is why we can't give any guarantee yet if it will do what it's supposed to do.
Hope this helps, Christian
[1] http://files.basex.org/releases/latest/ [2] http://docs.basex.org/wiki/Configuration ___________________________
On Sun, Nov 11, 2012 at 8:31 AM, Srinivasan Muthu newsrini@gmail.com wrote:
First of all, great work you guys, thanks much.
We use BaseX 7.3 in client/server mode for concurrency purposes and have several databases. We have an updating function which updates the XML database after the initial creation to make sure the attributes are setup for faster querying. Here is the function:
declare updating function local:processVMs($dbName as xs:string){ let $doc := doc($dbName) let $vms := $doc/root/proj/VM return if (empty($vms/@desktopId)=true()) then ( for $vm in $vms let $desktopId := local:get-desktop-id-from-vm($vm) (: function not provided here:) return insert node (attribute {'desktopId'} {string($desktopId)}, 'text', <VM/>) into $vm) else () };
This function takes a minute to run when there are about 3000 objects. While this query runs, BaseX queues all other xqueries (including read xqueries on other databases too) and thereby rendering the server unresponsive until this update query is done. Due to this even the queries that are running on other databases become unresponsive and our application looks frozen until this update query is done.From reading old email archives here, I see that BaseX transaction monitor will queue all requests when update query is processed as multiple dbs can be updated using one xQuery.
Is this really true and is there any way to hint transaction monitor to lock only the database that is being updated and not the entire server?
Thanks, Srini
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk