Hi Ivan,
Steps:
- Started server, started terminal client, checked there are no text and
attribute indexes. 2. Started my Java application that runs several tests on database: querying, adding, removing.
So, if I got it right, your Java application wasn't communicating with the BaseX server instance from 1? – In fact, the standalone and client/server mode should never be mixed. Some time ago, we played around with global locking mechanisms to avoid access to databases that are currently opened by a server instance; we might reintroduce this one day to prevent cases like yours.
If you're only working with clients accessing the same server instance, however, you shouldn't encounter any problems. If I'm wrong, this would be sth. we should have another look at.
- Then I forgot to reopen terminal client and used the one that I opened in
Step 1.
...indeed that's completely ok – Step 2 should rather be avoided (if it didn't access the server from 1, as I mentioned above)
Hope this helps, Christian
- Run optimize command for the collection and got error.
- Cannot open the collection any more as I'm getting 'Out of memory'.
It's clear that I shouldn't have used the terminal client that I opened before execution of my Java application. But sometimes it's hard to remember. And it's completely unacceptable that these actions result in the corrupted database. You really should catch ArrayIndexOutOfBoundsException everywhere in order to save database from being corrupted.
Terminal client stacktrace:
optimize
Possible bug? Feedback is welcome: basex-talk@mailman.uni-konstanz.de BaseX 6.3: java.lang.ArrayIndexOutOfBoundsException: -1 org.basex.data.PathSummary.add(PathSummary.java:68) org.basex.core.cmd.Optimize.stats(Optimize.java:68) org.basex.core.cmd.Optimize.run(Optimize.java:34) org.basex.core.Command.run(Command.java:236) org.basex.core.Command.exec(Command.java:218) org.basex.core.Command.execute(Command.java:66) org.basex.server.ServerProcess.run(ServerProcess.java:161)
open products
Out of Main Memory.
Best regards, Ivan
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk