Hi David,
this is maybe something we could append to the documentation that Christian already pointed you to.
As far as I get it, the concurrency management works single writer/multiple reader. If you are writing to database A all reads on said database are blocked until modification is finished. Other databases may still be readable, depending on whether the compiler can figure out if it is safe.
--> If you call db:add() on database A, you cannot read on database A. All other dbs might still be accessible. If you start another server process P2 you might run into problems when process P1 starts another update operation (because this one doesn't know about P2's reads).
I hope this wraps it up correctly ... Lukas
On Thu, Mar 5, 2015 at 1:55 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi David,
Thanks for your mail. If i get it right, you are adding a new XML file into a database, using the client/server architecture, and you'd like to read documents from another database, right? This shouldn't be a problem. What API are you working with (how do you add the new file)?
Cheers, Christian
PS: You are invited to also have a look into our Wiki article on transactions [1].
[1] http://docs.basex.org/wiki/Transaction_Management
On Thu, Mar 5, 2015 at 1:31 PM, David Mathei david.mathei@gmail.com wrote:
Hello BaseX Team,
I am loading a big file into BaseX (2.1G) and try to understand the
handling
of concurrent reads during that process. The size does only matter in so far, as loading seems to block reading for an extended amount of time.
I observe that I can not read the collection I'm loading into nor any
other
collection under the same server. When I use another server process on a different port to write to the target collection I can read other collections without delay, the collection I'm loading into is (obviously) blocked by the upd.basex flag.
Is there no parallelisation involved that would separate reading from writing processes, or does that only come into play for xquery updates
that
run under the transaction module?
My PARALLEL setting is at the default of 8 and I'm on version 8.0.1. And
I
apologise already if I missed some obvious configuration...
Thanks to everyone involved in this project!
David Mathei