On Wed, Jun 8, 2011 at 3:55 AM, Andreas Weiler andreas.weiler@uni-konstanz.de wrote:
Hi, It seems that the database isnt closed correctly in your Session. If you try to delete the database then with another Session, it fails, cause the first Session has it still open.
So that's a bug in BaseX then? Do you need a reproducible test case?
- Godmar
On 08.06.2011, at 01:32, Godmar Back wrote:
On Tue, Jun 7, 2011 at 6:11 PM, Godmar Back godmar@gmail.com wrote:
Hi,
I'm trying to delete an XML document by invoking 'execute("DROP
DATABASE name")' using the Java binding, but I'm getting:
Tue Jun 07 18:06:10 EDT 2011: Unexpected exception:
java.io.IOException: Database 'feed_vsony7_at_vt_dot_edu_vijayfeed' is
currently locked.
java.io.IOException: Database 'feed_vsony7_at_vt_dot_edu_vijayfeed' is
currently locked.
at org.libx.libappdatabase.BaseXSessionSupport.execute(BaseXSessionSupport.java:71)
There are no concurrent accesses to the database. I'm creating a
document, then I'm successfully running a few XUpdate/XQuery's on it,
then I attempt to delete it as part of a unit test.
FWIW, the problem persists in 6.6.2.
When the DROP DB fails, show databases shows:
show databases
1 opened database(s):
- libx2_feeds_test (1x)
Here's a log: http://top.cs.vt.edu/~gback/bx/b662bugs/2011-06-07.log
The documentation at
http://docs.basex.org/wiki/Commands_6.6.3#DROP_DATABASE says "The
command fails if the specified database does not exist or is currently
locked, or if the database could not be deleted for some other
reason." but nowhere else does it mention what 'locking' the database
means.
In the XQuery model, I can only see a need for locking internally
during an XQuery, which means that leaving a database locked, or
failing to delete it because of it (instead of waiting until it is no
longer accessed) would be a bug.
ps:
(I'm not issuing any "OPEN" commands. What does OPEN/CLOSE do, anyway?)
Never mind about this question - this doesn't apply.
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk