Open akotlar opened 8 years ago
Sorry I've never really used the reset/renew stuff -- hopefully @salortiz can look at this when he has some time available.
As for alternatives, you could just create a new transaction for every dbRead call. I suspect the extra locking/allocation would be lost in the noise of the perl interpreter's slowness -- do you have some reason to believe otherwise, such as high-levels of contention on the reader table lock?
My use case below. "Transaction Terminated" returned when $txn->renew() called. I don't think this is the expected behavior, because transaction termination should only occur if there are no remaining references to the transaction, according to LMDB_File.pm, but there clearly are, below.
There may be a better way of doing what I aim: Reuse a read-only transaction, in a read-only environment, across multiple dbRead function calls.
Thanks!
Same thing occurs in a version where the new transaction is given to $DB->Txn instead, and the entire $DB reference is stored in $envs.