Skip to content

Commit

Permalink
Make unspilling pages that aren't in the spilled page list be a warni…
Browse files Browse the repository at this point in the history
…ng rather than error, #153
  • Loading branch information
kriszyp committed Apr 22, 2022
1 parent 224cd6e commit 69a7082
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dependencies/lmdb/libraries/liblmdb/mdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2909,8 +2909,10 @@ mdb_page_unspill(MDB_txn *txn, MDB_page *mp, MDB_page **ret)
x = 0;
}
if (x == 0 && !txn->mt_parent) {
last_error = "mdb_page_unspill no parent";
return MDB_PROBLEM; /* should be a spilled page */
/* should be a spilled page */
fprintf(stderr, "Page %u was unspilled, but was not found in spilled page list (size of %u)\n", mp->mp_pgno, txn->mt_spill_pgs[0]);
/*last_error = "mdb_page_unspill no parent";
return MDB_PROBLEM; */
}

{
Expand Down Expand Up @@ -4522,7 +4524,7 @@ mdb_txn_commit(MDB_txn *txn)
goto fail;
if ((unsigned)txn->mt_loose_count < txn->mt_u.dirty_list[0].mid) {
last_error = malloc(100);
sprintf(last_error, "The loose count %i is less than the size of the dirty list %i", txn->mt_loose_count, txn->mt_u.dirty_list[0].mid);
sprintf(last_error, "The loose count %i is less than the size of the dirty list %u", txn->mt_loose_count, txn->mt_u.dirty_list[0].mid);
rc = MDB_PROBLEM; /* mt_loose_pgs does not match dirty_list */
goto fail;
}
Expand Down

0 comments on commit 69a7082

Please sign in to comment.