[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: LMDB: issue with mdb_cursor_del
- To: Howard Chu <hyc@symas.com>, openldap-devel@openldap.org
- Subject: Re: LMDB: issue with mdb_cursor_del
- From: timur.kristof@gmail.com
- Date: Tue, 17 Oct 2017 20:13:08 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:in-reply-to:references:date:mime-version :content-transfer-encoding; bh=YzSyJ/gBIHAcyhO1huJRxB8w12J/D5u/E2TC81Z1ADQ=; b=sMyhj7HSJnewJmwBxqTblIG9yPbLc8IBsOpZ2UYbdLEIQGxBLkxJrFYYzNpsJHqi4p oI+hY/NFfh9kDiID63OnHoKVnMpZvMYIA9qU9/fuMGbVQhUBVeBqeJrXyIkUT9sBlWb2 0Z5jTL6BS0E19thNudEpTRwbT/EcyEqIwxVxG6SsKNL3T43fHuBxZFtbqwrzwQ6WA+Hm X9eImvyPfFaWLykLVdbKEPH3tIHrKDmOSFFYRAO/jX7uRXlMp+0WYJIb860s3N3AQYg0 HBsgk7aWmqy5i27fGLGOy/LzEQBwOwE6dSNzTUvYymFNzfLPLVUAfVxPShlp9nL+Axcj xIzQ==
- In-reply-to: <18979482-46fe-63e3-401d-747ce370ba27@symas.com>
- References: <1508140841.7618.10.camel@gmail.com> <WM!6792c78afef18c1854e94e0a10cf3008b6580c69be5346e0f130cde6864c6423c43df31f7af634f227b1dd65acdaf163!@mailstronghold-1.zmailcloud.com> <18979482-46fe-63e3-401d-747ce370ba27@symas.com>
On Mon, 2017-10-16 at 11:51 +0100, Howard Chu wrote:
> >
> > 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
> > of error?
>
> Take a look at the value of rc, then look in midl.c.
I've taken a look.
The value of rc is -1, which according to the mdb_mid2l_insert code
means that it's a duplicate value, so the page is already in the txn's
dirty pages list.
Since it comes from an mdb_page_alloc call, it is a bit weird that the
newly allocated page is already on the list, but maybe it's a reused
page?
> Most likely the dirty
> list is too big, which means you're trying to do too much in a single
> transaction.
The code did work on the compacted database, and it was doing exactly
the same operations on it, so this was unlikely.
- Timur