Hi,
Thank you for making LMDB available.
I’m using LMDB on OSX (without MDB_WRITEMAP, so the database file size is relative to the stored data, not the max mapsize). I’ve noticed that write transactions that have a large number of ‘attempted’ updates, but that do not actually make any updates due to MDB_NOOVERWRITE / MDB_NODUPDATA, cause an increase in the database file size, which mdb_stat attributes to an increased number of free pages. This is with latest master of the github mirror.
I’m wondering if you have any hints on what I may be doing wrong ? I’d like if possible to avoid the database size increasing if the write pass did not make any updates.
Argyrios Kyrtzidis wrote:
Hi,
Thank you for making LMDB available.
I’m using LMDB on OSX (without MDB_WRITEMAP, so the database file size is relative to the stored data, not the max mapsize). I’ve noticed that write transactions that have a large number of ‘attempted’ updates, but that do not actually make any updates due to MDB_NOOVERWRITE / MDB_NODUPDATA, cause an increase in the database file size, which mdb_stat attributes to an increased number of free pages. This is with latest master of the github mirror.
I’m wondering if you have any hints on what I may be doing wrong ? I’d like if possible to avoid the database size increasing if the write pass did not make any updates.
Call mdb_txn_abort() instead of mdb_txn_commit() when you encounter KEYEXIST errors.
On Apr 3, 2016, at 8:35 PM, Howard Chu hyc@symas.com wrote:
Argyrios Kyrtzidis wrote:
Hi,
Thank you for making LMDB available.
I’m using LMDB on OSX (without MDB_WRITEMAP, so the database file size is relative to the stored data, not the max mapsize). I’ve noticed that write transactions that have a large number of ‘attempted’ updates, but that do not actually make any updates due to MDB_NOOVERWRITE / MDB_NODUPDATA, cause an increase in the database file size, which mdb_stat attributes to an increased number of free pages. This is with latest master of the github mirror.
I’m wondering if you have any hints on what I may be doing wrong ? I’d like if possible to avoid the database size increasing if the write pass did not make any updates.
Call mdb_txn_abort() instead of mdb_txn_commit() when you encounter KEYEXIST errors.
Thanks for the tip! I’d need to keep track of more information across the various database updates but it is doable.
Do you think there is a missed opportunity for reusing existing free pages ? I’d expect that it would not consistently increase the number of free pages, if there are free pages available.
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Hi,
With latest lmdb source (github mirror: 8fff90db7ed1e650395f39f9e8b22673aa74aa2b), there is an assertion hit when deleting the cursor and then doing mdb_cursor_get(MDB_NEXT) and 'entering' DUPSORT items. To demonstrate see attached diff which modifies mtest3.c. When run you see this:
mdb.c:6424: Assertion 'mc->mc_flags & C_INITIALIZED' failed in mdb_cursor_next()
Is this a bug or am I doing something wrong ?
Argyrios Kyrtzidis wrote:
Hi,
With latest lmdb source (github mirror: 8fff90db7ed1e650395f39f9e8b22673aa74aa2b), there is an assertion hit when deleting the cursor and then doing mdb_cursor_get(MDB_NEXT) and 'entering' DUPSORT items. To demonstrate see attached diff which modifies mtest3.c. When run you see this:
mdb.c:6424: Assertion 'mc->mc_flags & C_INITIALIZED' failed in mdb_cursor_next()
Is this a bug or am I doing something wrong ?
Sounds like a bug, please submit an ITS, thanks.
On Apr 18, 2016, at 3:12 AM, Howard Chu hyc@symas.com wrote:
Argyrios Kyrtzidis wrote:
Hi,
With latest lmdb source (github mirror: 8fff90db7ed1e650395f39f9e8b22673aa74aa2b), there is an assertion hit when deleting the cursor and then doing mdb_cursor_get(MDB_NEXT) and 'entering' DUPSORT items. To demonstrate see attached diff which modifies mtest3.c. When run you see this:
mdb.c:6424: Assertion 'mc->mc_flags & C_INITIALIZED' failed in mdb_cursor_next()
Is this a bug or am I doing something wrong ?
Sounds like a bug, please submit an ITS, thanks.
Submitted as ITS#8406.
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
openldap-technical@openldap.org