[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openldap-devel
Subject:    Re: LMDB: issue with mdb_cursor_del
From:       ЛеР<leo () yuriev ! ru>
Date:       2017-10-20 13:36:31
Message-ID: CAO2+NUBqqhu3Jz1DNpoR2-PpNTUeiQOKfqPVOzbRvrNJMLpVBw () mail ! gmail ! com
[Download RAW message or body]

2017-10-20 16:34 GMT+03:00  <timur.kristof@gmail.com>:
> Hi Leonid,
>
>> 1) With MDB_WRITEMAP the mdb_mid2l_append() will be used.
>> Internally mdb_mid2l_append() don't check for duplicated, but just
>> append a given page number to the list.
>> Therefore when database opens with MDB_WRITEMAP this bug leads to
>> duplicates inside the dirty-list and then (seems) to database
>> corruption.
>>
>> 2) Without MDB_WRITEMAP the mdb_mid2l_insert() will be used.
>> Internally mdb_mid2l_insert() made insertion into a sorted list, so
>> it
>> checks for duplicates and returns -1 for such case.
>> Therefore when database opens without MDB_WRITEMAP this bug leads
>> only
>> to assertion failure, or nothing if assertions checking was disabled.
>
> Yes, that's exactly what I said.
> That simply allowing -1 would fix the problem for the non-writemap
> case, because then there is no duplicate. Right?

Yes, obvious.

Leonid.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic