[Date Prev][Date Next]
Re: (ITS#8299) LMDB mdb_del data loss when used in a cursor (new repro)
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8299) LMDB mdb_del data loss when used in a cursor (new repro)
- From: firstname.lastname@example.org
- Date: Wed, 04 Nov 2015 17:16:33 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
Howard Chu wrote:
> malyn@strangeGizmo.com wrote:
>> Full_Name: Michael Alyn Miller
>> Version: Git head
>> OS: Windows 8.1 x64, NixOS 14.12 x64
>> URL: ftp://ftp.openldap.org/incoming/michaelalynmiller-151103.c
>> Submission from: (NULL) (126.96.36.199)
>> I have a new repro of an ITS#8264-like situation, but with different input data
>> and with slightly different results. Note that ITS#8264 was fixed with the
>> dataset provided in that bug; this is a different dataset and produces
>> The referenced test runs twice: once with mdb_cursor_del and once with mdb_del.
>> Just like before, mdb_cursor_del performs correctly whereas mdb_del corrupts
>> database. In this case, mdb_del incorrectly removes one extra key (a key
>> prefixed with 04000000000000003a...), and incorrectly leaves 21 keys in place
>> that should have been deleted (those keys begin with 05000000000000003a...).
>> This last item is the primary difference between these two bugs.
>> Unlike ITS#8264, you do not need to remove the database in between test runs in
>> order to repro this issue, although the results are still incorrect and will
>> eventually cause a bus error.
> Thanks again for the excellent bug reports. Fixed now in git.
I should also note that this is not a sensible use case. mdb_del has to
construct a cursor to perform its work; if you already have a cursor open you
should just use mdb_cursor_del. mdb_del is meant for one-shot use and is much
slower than mdb_cursor_del when used in an iteration.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/