Comparing version 2.9.3-beta.5-debug to 2.9.3-beta.6-debug
{ | ||
"name": "lmdb", | ||
"author": "Kris Zyp", | ||
"version": "2.9.3-beta.5-debug", | ||
"version": "2.9.3-beta.6-debug", | ||
"description": "Simple, efficient, scalable, high-performance LMDB interface", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -162,2 +162,3 @@ import { RangeIterable } from './util/RangeIterable.js'; | ||
buffer.txn = txn; | ||
txn.refCount = (txn.refCount || 0) + 1; | ||
@@ -409,2 +410,3 @@ return data; | ||
let store = this; | ||
let txn_handle; | ||
function resetCursor() { | ||
@@ -438,3 +440,3 @@ try { | ||
cursorAddress = cursor.address; | ||
txn.refCount = (txn.refCount || 0) + 1; // track transaction so we always use the same one | ||
if (txn.use) txn.use(); // track transaction so we always use the same one | ||
if (snapshot === false) { | ||
@@ -500,6 +502,5 @@ cursorRenewId = renewId; // use shared read transaction | ||
txn.renewingRefCount--; | ||
if (--txn.refCount <= 0 && txn.notCurrent) { | ||
txn.done?.(); | ||
if (txn.refCount <= 0 && txn.notCurrent) { | ||
cursor.close(); | ||
txn.abort(); // this is no longer main read txn, abort it now that we are done | ||
txn.isDone = true; | ||
} else { | ||
@@ -506,0 +507,0 @@ if (db.availableCursor || txn != readTxn) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2441985
6483