Hi Omar,

> Is this intentional? Is this just a side effect? I noticed that internally
> the code I run is wrapped in an xquery:eval. Maybe this causes this lock?

Yes, that’s a known behavior. If xquery:eval is invoked, it is not
possible to know in advance which databases will be opened by that
command.

However, with BaseX 9 (and the latest snapshot), it is possible to
start queries as jobs from the Files panel. This way, no global locks
will be assigned (provided that the query allows for the static
detection of accessed databases). Once WebSockets will be available
[1], we plan to rewrite the Query panel to also use jobs:eval instead
of xquery:eval.

> Just discovered sth. unexpected: Every query executed in dba Queries causes
> a global read lock. Also other (very simple) queries using RESTXQ which use
> a DB explicit in the query are executed with a global read lock.

Dou you have an example?

Cheers,
Christian

[1] https://github.com/BaseXdb/basex/issues/1449

Reply via email to