Skip to content

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Jan 7, 2024
1 parent 198b4f8 commit 6ea48c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lmdb",
"author": "Kris Zyp",
"version": "2.9.3-beta.2-debug",
"version": "2.9.3-beta.3-debug",
"description": "Simple, efficient, scalable, high-performance LMDB interface",
"license": "MIT",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions src/txn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ TxnWrap::TxnWrap(const Napi::CallbackInfo& info) : ObjectWrap<TxnWrap>(info) {
info.This().As<Object>().Set("address", Number::New(info.Env(), 0));
return;
}
parentTw = nullptr;
parentTxn = nullptr;
}
int rc = mdb_txn_begin(ew->env, parentTxn, flags, &txn);
Expand Down Expand Up @@ -105,6 +106,9 @@ void TxnWrap::removeFromEnvWrap() {
if (this->ew) {
if (this->ew->currentWriteTxn == this) {
this->ew->currentWriteTxn = this->parentTw;
if (this->parentTw) {
fprintf(stderr, "ending child transaction\n");
}
}
else {
auto it = std::find(ew->readTxns.begin(), ew->readTxns.end(), this);
Expand Down

0 comments on commit 6ea48c5

Please sign in to comment.