[Date Prev][Date Next]
Re: LMDB: issue with mdb_cursor_del
- To: email@example.com, firstname.lastname@example.org
- Subject: Re: LMDB: issue with mdb_cursor_del
- From: Howard Chu <email@example.com>
- Date: Mon, 16 Oct 2017 11:51:08 +0100
- In-reply-to: <WMfirstname.lastname@example.org>
- References: <email@example.com> <WMfirstname.lastname@example.org>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 SeaMonkey/2.53a1
I have an app that uses LMDB, and I've experienced an interesting
issue: when trying to delete a certain item with mdb_cursor_del, it
crashed with the following backtrace: https://pastebin.com/7p9wtkj9
It appears that it couldn't mark a page as dirty.
Here is the relevant assertion from mdb_page_dirty:
rc = insert(txn->mt_u.dirty_list, &mid);
mdb_tassert(txn, rc == 0); // assertion failed
What might I be doing wrong in my application that triggers this sort
Take a look at the value of rc, then look in midl.c. Most likely the dirty
list is too big, which means you're trying to do too much in a single transaction.
The database was about 60MB, and I now compacted it using mdb_copy -c.
Now it is only ~6MB, and running the app with the compacted database,
the above error also disappeared.
I'm not sure why the compacting fixed the problem, could somebody offer
an insight about this?
Thank you guys in advance for your answers!
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/