Hello,
I've got 'Out of memory' error and corrupted database again, this time
it's for 6.3 version.
Steps:
1. 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.
3. Then I forgot to reopen terminal client and used the one that I
opened in Step 1.
4. Run optimize command for the collection and got error.
5. 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(a)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