Conversation
|
My implication is that I want kryszyp features, but with a sync transaction that also can be aborted. For this, |
|
I'm a little hesitant to try to port over large chunks of these partial changes from lmdb-js, since the whole point of making this separate lmdb-js is to house these more significant changes, and having partial ports seems like a lot of additional testing effort.
Why isn't this working for you in lmdb-js, it has abortable sync transactions? |
|
Ok, the problem I had was just that I forgot to close a cursor 🤦♂️ Further tests show that it works out of the box, yes.
And I'm short-sighted and was just reading for rollbacks, which |
|
@kriszyp check this: Just for you to know, if that's something about lmdb-js or maybe is just about TypeScript and the conversion I have on my side. The typings says that |
Just for testing, I just copied lmdb-js changes to node-lmdb and works like a charm (at least the mapsize autogrow without needing to relaunch the transaction).
Haven't done any further tests, but looks like it should work out of the box.
EDIT: Just noticed a weird problem. Sometimes it fails with
0xC0000005after a couple of auto-regrows and trying to do aputString. This is the test:Fails on
canRollbacktest.Is a pretty straightforward test (instantiates the class, runs
awat init(), then runsawait run()and then runsawait dispose()).Keeping the PR here just in case @kriszyp can throw a bit of light.