Disable locking capability of BaseX
Thursday, 15 August 2013 · 3 messages
MH
Marcel Hanser15 Aug 2013 13:14 #
Hi there,
is there the possibility to disable the locking of databases in BaseX? I would like to see changes performed concurrently from another process on my database on the fly using the GUI for debugging issues.
Best Regards,
Marcel
JE
Jens Erat15 Aug 2013 13:34 #
Hi Marcel,
while another process is performing changes the database state is not in a consistent state and cannot be read by other processes.
Anyway you'd probably not be able to see a lot because of XQuery Update's pending update list, especially if the calculation of changes to perform is much more expensive than actually writing them to disk. No changes are written back to the database until the very end of each query, so all you'd be able to debug is whether BaseX is working correctly.
Regards,
Jens
--
Jens Erat
[phone]: tel:+49-151-56961126
[mail]: mailto:email at jenserat.de
[jabber]: xmpp:jabber at jenserat.de
[web]: http://www.jenserat.de
PGP: 350E D9B6 9ADC 2DED F5F2 8549 CBC2 613C D745 722B
Quoted text · Marcel Hanser · 11 lines
Am 15.08.2013 um 13:14 schrieb Marcel Hanser <marcel.hanser at uni-konstanz.de>: > Hi there, > > is there the possibility to disable the locking of databases in BaseX? I would like to see changes performed concurrently from another process on my database on the fly using the GUI for debugging issues. > > Best Regards, > Marcel > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
MH
Marcel Hanser15 Aug 2013 15:39 #
Hi Jens,
thank you for the quick answer. You're right... hmm maybe i should explain my use case a bit clearer, i want to see changes after a query is completely processed.
I would be nice to see if my query does the expected thing after each request to my server on the fly. Btw i'm using BaseX as my persistence behind a Jax-rs RESTful interface: don't ask i'm unfortunately not able to switch to restxq.
Currently i'm testing/experiment with my queries as follows:
- Send a manual test request to my server, the server binds the given request entity to a query and executes it. The query then hopefully updates the DB.
- Then i open the DB within the GUI and look into it and see if the query worked out.
- I also would like to inject small faults (like deleting sub nodes or whatever) to see how my query behave. (Due of this little requirement just a implementation of a GET/DELETE resource would not completely solve my problem). But for doing this i have to close the DB and therefore to stop my server.
- Then i close the DB in the GUI and restart my server and perform the next manual persisting request.
It's kind of annoying :/ And since the database is safed for concurrent access be my person it would be nice to disable the locking. Maybe there is a better way? Maybe to close/reopen the database after each request? But this might be a potential performance killer, didn't it? Any suggestions are welcome.
Regards,
Marcel
Quoted text · Jens Erat · 10 lines
Am 15.08.2013 13:34, schrieb Jens Erat: > Hi Marcel, > > while another process is performing changes the database state is not in a consistent state and cannot be read by other processes. > > Anyway you'd probably not be able to see a lot because of XQuery Update's pending update list, especially if the calculation of changes to perform is much more expensive than actually writing them to disk. No changes are written back to the database until the very end of each query, so all you'd be able to debug is whether BaseX is working correctly. > > Regards, > Jens >
Written for BaseX 7.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery