Sorting a memory leak in datastore/journalstore

This commit is contained in:
John Jones 2017-09-07 11:05:56 -05:00
parent bf7ba9049c
commit cb1ea3ceff
12 changed files with 200 additions and 180 deletions

View file

@ -50,7 +50,7 @@ int lmdb_journalstore_cursor_close(struct lmdb_trans_cursor *cursor);
int journal_record_free(struct JournalRecord* rec);
int lmdb_journalstore_journal_add(MDB_txn* mdb_txn, struct JournalRecord* record);
int lmdb_journalstore_journal_add(struct lmdb_trans_cursor *journalstore_cursor, struct JournalRecord *journalstore_record);
/***
* Attempt to get a specific record identified by its timestamp and bytes
@ -61,3 +61,11 @@ int lmdb_journalstore_journal_add(MDB_txn* mdb_txn, struct JournalRecord* record
*/
int lmdb_journalstore_get_record(void* handle, struct lmdb_trans_cursor *journalstore_cursor, struct JournalRecord **journalstore_record);
/***
* Convert the JournalRec struct into a lmdb key and lmdb value
* @param journal_record the record to convert
* @param db_key where to store the key information
* @param db_value where to store the value information
*/
int lmdb_journalstore_build_key_value_pair(const struct JournalRecord* journal_record, struct MDB_val* db_key, struct MDB_val *db_value);

View file

@ -3,6 +3,8 @@
#include "lmdb.h"
struct lmdb_trans_cursor {
MDB_env* environment;
MDB_txn* parent_transaction;
MDB_txn* transaction;
MDB_dbi* database;
MDB_cursor* cursor;