Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Commit

Permalink
lmdb: MDB_LIFORECLAIM & MDB_COALESCE modes.
Browse files Browse the repository at this point in the history
Reclaim FreeDB in LIFO order - this is a main feature.
Also aim to coalesce small FreeDFB records.
  • Loading branch information
erthink committed Jan 9, 2015
1 parent ddcecdd commit 829c206
Show file tree
Hide file tree
Showing 2 changed files with 337 additions and 76 deletions.
10 changes: 10 additions & 0 deletions libraries/liblmdb/lmdb.h
Expand Up @@ -292,6 +292,10 @@ typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *rel
#define MDB_NORDAHEAD 0x800000
/** don't initialize malloc'd memory before writing to datafile */
#define MDB_NOMEMINIT 0x1000000
/** aim to coalesce FreeDB records */
#define MDB_COALESCE 0x2000000
/** LIFO policy for reclaiming FreeDB records */
#define MDB_LIFORECLAIM 0x4000000
/** @} */

/** @defgroup mdb_dbi_open Database Flags
Expand Down Expand Up @@ -593,6 +597,12 @@ int mdb_env_create(MDB_env **env);
* caller is expected to overwrite all of the memory that was
* reserved in that case.
* This flag may be changed at any time using #mdb_env_set_flags().
* <li>#MDB_COALESCE
* Aim to coalesce records while reclaiming FreeDB.
* This flag may be changed at any time using #mdb_env_set_flags().
* <li>#MDB_LIFORECLAIM
* LIFO policy for reclaiming FreeDB records. This significantly reduce
* write IPOS in case MDB_NOSYNC with periodically checkpoints.
* </ul>
* @param[in] mode The UNIX permissions to set on created files. This parameter
* is ignored on Windows.
Expand Down

0 comments on commit 829c206

Please sign in to comment.