There have been some issues with locking too much in 7.6, war did lots of optimizations in 7.7 (available as a developer release). Using either `set queryinfo on` or the GUI will print which databases will get locked. Is there anything surprising you?

http://files.basex.org/releases/latest/

XQuery is a very powerful language and it's not always easy to determine which databases to lock. If you're still having issues in 7.7, I'd be glad if you would provide me with some example queries so we can do further optimizations.

Using GLOBALLOCK as proposed by Dirk can help right now if there are problems, but it should be regarded deprecated and could be removed in later versions. The GUI (and only this) still enforces GLOBALLOCK, as we didn't check for possible problems in there yet.

Regards,
Jens

-- 
Jens Erat
tel:+49-151-56961126
xmpp:jabber@jenserat.de         (preferred messenger)
http://www.jenserat.de/conctact (PGP keys, more ways to contact me)
--
Sent from my tablet pc. Sorry for typos - damn those touchscreens. No PGP on this device - I will not be able to read your encrypted message before I'm back on my computer.

Am 25.04.2013 um 10:31 schrieb Dirk Kirsten <dk@basex.org>:

Hello Scott,

this sounds like a bug to me. BaseX 7.6 introduced database locking, but it is disabled for the standalone version as far as I know. This would very much explain the different behaviour in the different versions of BaseX. However, you can disable database locking using the GLOBALLOCK option.

Additionally, you can find out more about the locking in the documentation at http://docs.basex.org/wiki/Transaction_Management

Getting back to your problem, it seems like a misbehaviour to me that something is blocked in your application although you have only read-only queries. Normally, reading queries should not block each other. Maybe you could give us some more information (a SSCCE would be nice) using the QUERYINFO

Cheers,
Dirk


On Thu, Apr 25, 2013 at 9:59 AM, Scott Martens <scott.martens@uni-tuebingen.de> wrote:
Hi all,

I have an application that's embedding BaseX in Java and generates all xqueries internally.  These queries are *always* read-only.  The problem I'm running into is that file locking prevents more than one user from reading the same file at the same time - something that BaseX 7.2 didn't do, but BaseX 7.6 does.

I've tried using the client-server approach to solve the problem, and it works, sort-of.  But it has a number of other problems for the conditions that it's being run under, and the embedded solution was faster and more robust.

It looks to me like the BaseX standalone command line app and basexgui just ignore file-locking, and as long as I'm just using read-only queries, I have no trouble issuing two queries at once on the same database.    Is this true?  And if so, how is it done?  Because this app is doing only read-queries, it's a lot better a solution for me than client-server, but I can't figure out where in the source code the database is being opened and how it's being done in a way that bypasses locks.

Can anyone give me pointers?

-- Scott Martens
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk



--
Dirk Kirsten, BaseX GmbH, http://basex.org
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
|   Dr. Christian Grün, Alexander Holupirek, Michael Seiferle
`-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk