Hi Christian,
I’m glad to tell you that I have now implemented the projected optimizations
Thank you for providing the snapshot. I’ve downloaded it and begun running some tests.
Unfortunately I’m immediately finding some odd behaviour. I’m using the script I provided in my original issue report to the list.
I can use replace() to add as many documents to the database as I want as long as the documents are new (no document exists to be replaced).
If I use replace() on one document in a transaction ($files set to 1 in my script) then everything works.
However if I try to replace more than one file in a transaction ($files set to 2+) I get an error.
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 8.0 beta 3a7d766 Java: Oracle Corporation, 1.7.0_60 OS: Mac OS X, x86_64 Stack Trace: java.lang.RuntimeException: Key does not exist: 'Name' at org.basex.util.Util.notExpected(Util.java:60) at org.basex.index.value.UpdatableDiskValues.delete(UpdatableDiskValues.java:82) at org.basex.data.DiskData.indexDelete(DiskData.java:390) at org.basex.data.DiskData.indexDelete(DiskData.java:452) at org.basex.data.Data.delete(Data.java:632) at org.basex.data.atomic.Delete.apply(Delete.java:39) at org.basex.data.atomic.AtomicUpdateCache.applyUpdates(AtomicUpdateCache.java:298) at org.basex.data.atomic.AtomicUpdateCache.execute(AtomicUpdateCache.java:282) at org.basex.query.up.DataUpdates.apply(DataUpdates.java:161) at org.basex.query.up.ContextModifier.apply(ContextModifier.java:118) at org.basex.query.up.Updates.apply(Updates.java:129) at org.basex.query.QueryContext.iter(QueryContext.java:351) at org.basex.query.QueryContext.execute(QueryContext.java:605) at org.basex.query.QueryProcessor.execute(QueryProcessor.java:100) at org.basex.core.cmd.AQuery.query(AQuery.java:82) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:360) at org.basex.core.Command.execute(Command.java:94) at org.basex.gui.GUI.exec(GUI.java:417) at org.basex.gui.GUI.access$500(GUI.java:41) at org.basex.gui.GUI$8.run(GUI.java:361)
If I keep running the command then eventually it will work (eventually is related to the number of documents being replace/in the database). Note that this is in the GUI with the database open in the GUI.
If I do it in the GUI but with the database closed I get alternating errors between ‘Key does not exist’ and ‘Key should not exist’ each time I run. The error never corrects itself.
I’m happy to investigate further and provide more details if required but I’m confused as to what might actually be happening to cause this so I’m not sure where to go next. Let me if you need anything from me.
Regards, James