This commit is contained in:
2020-07-11 12:17:19 -04:00
parent 230988d6d1
commit 8127745f2b
12 changed files with 299 additions and 35 deletions

View File

@@ -4,14 +4,18 @@
#include <pthread.h>
#include <lmdb.h>
#define STORE_SIZE_TN 1024 * 1024 * 5
#define STORE_SIZE_TAG 1024 * 16
typedef struct store_t {
MDB_dbi dbi;
MDB_env *env;
size_t size;
size_t chunk_size;
pthread_rwlock_t lock;
} store_t;
store_t *store_create(char *path);
store_t *store_create(char *path, size_t chunk_size);
void store_destroy(store_t *store);