sidnt / lmdz

0 stars 0 forks source link

nesting transactions in lmdb #46

Open sidnt opened 4 years ago

sidnt commented 4 years ago
sidnt commented 4 years ago

Once a single read-write transaction is opened, all further attempts to begin one will block until the first one is committed or aborted.

then i can't see, how do we use the nested transaction feature, because we can't nest one write transaction inside the other. maybe it is allowed for RW transactions that are made child of that RW transaction.

now creation of a txn-handle is not like creating a description in the zio sense, that it will be executed later. when we create the txn handle, and use it in mdb_get or mdb_put operations, the modifications are happening underneath, as the method gets called, directly in the memory mapped file. it's just that until the txn is committed, its changes aren't visible in the db.

but when we have zioland at our disposal, we can toy around with mere descriptions of lmdbland types, and compose them around, until we arrive at an optimized description that we can send into lmdbland for execution.


ripland so, to nest one txn handle, with another, i need and to create a nest, i can only tell what the parent