[Date Prev][Date Next]
Re: LMDB: issue with mdb_cursor_del
2017-10-20 16:34 GMT+03:00 <firstname.lastname@example.org>:
> 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
>> 2) Without MDB_WRITEMAP the mdb_mid2l_insert() will be used.
>> Internally mdb_mid2l_insert() made insertion into a sorted list, so
>> checks for duplicates and returns -1 for such case.
>> Therefore when database opens without MDB_WRITEMAP this bug leads
>> 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?