Hello Godmar,

While I in principle agree with your criticism about the side effects at the CREATE DB command and I also understand your frustration with a somehow unexpected behaviour, I'd like to remind you that BaseX is an open-source project. If Christian invites you to help to improve the documentation we do not imply that BaseX has to be fixed by its customers. However, as an open-source project we, of course, rely on the contribution of the community and we happily invite everyone to contribute to this project. So in this special case it could be one way to improve the documentation, but of course you are also invited to fix the issue and send a pull request on github. If you can't do this (e.g. because of time restrictions), that is also fine with us. Of course we will always try to fix issues - But we can just do this, if we are aware of them. As you just recently reported this issue, we now know about this issue and try to improve BaseX as a product - but of course you as a community member are also very welcome to help to improve it.

Cheers,
Dirk

On Thu, Jul 26, 2012 at 3:53 PM, Godmar Back <godmar@gmail.com> wrote:

ps: your current design, combined with your locking, also contains an inherent race condition users cannot avoid.

Namely, the statements

CREATE DB dbname
CLOSE

are not atomic.

As such, if a 'CREATE DB' request for the same dbname arrives in a different session before the created database was closed by the first session, that request will fail with the error I've been getting - and there's no way to avoid that in your design.  You'd need a CREATE DB dbname BUT DON"T OPEN IT command to avoid it.

Just something to consider...

 - Godmar


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