[Date Prev][Date Next]
Re: Issues arising from creating powerdns backend based on LMDB
Mark Zealey wrote:
I've found another weird - I have now converted the database to use
duplicates. Typically when I do mdb_cursor_get(... MDB_NEXT ) it will
set the key and value but I've found 1 place so far where I do it and on
the duplicate's second entry the value is set but the key is empty.
I don't see how this can happen; the only time we don't return the key
is if some operation actually failed. Can you send test code to
Attached .c shows it - create 3 keys with 5 entries under each. Actually
my report was incorrect - cursor_get() with MDB_NEXT or MDB_NEXT_DUP
never seems to set the key unless it is the first entry read... Perhaps
this is intended?!
Yes and no. It was intended for NEXT_DUP because, since it's a duplicate, you
already know what the key is. It is unintended for NEXT, for the opposite
reason, and in this case it's a bug.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/