Skip to content

Commit

Permalink
Allow freelist record to be skipped if not writes in the segment, #283
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Mar 29, 2024
1 parent 9530ab5 commit 0993f28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dependencies/lmdb/libraries/liblmdb/mdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -4333,12 +4333,12 @@ mdb_freelist_save(MDB_txn *txn)
key.mv_data = &id;
rc = mdb_cursor_get(&mc, &key, &data, MDB_SET_KEY);
if (rc == MDB_NOTFOUND) {
if (mop_len != 0) {
if (freelist_written_start < mop_len) {
fprintf(stderr, "Freelist record not found %u %u %u %u %u %u %i %i %i %i %i %u %u\n", id, mop_len, start_written,
pglast, env->me_freelist_start, env->me_freelist_end,
freelist_written_start, env->me_freelist_written_start, freelist_written_end, env->me_freelist_written_end,
i, fl_writes[0], fl_writes[1]);
mdb_tassert(txn, mop_len == 0);
mdb_tassert(txn, freelist_written_start >= mop_len);
}
rc = 0; // this is acceptable as long as there are no entries to write
break;
Expand Down

0 comments on commit 0993f28

Please sign in to comment.