mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Do WAL checkpointing in our own thread(s).
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
#include "database.h"
|
||||
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
#include <boost/thread/mutex.hpp>
|
||||
|
||||
struct sqlite3;
|
||||
struct sqlite3_stmt;
|
||||
|
||||
|
||||
class SqliteDatabase : public Database
|
||||
{
|
||||
sqlite3* mConnection;
|
||||
sqlite3_stmt* mCurrentStmt;
|
||||
bool mMoreRows;
|
||||
|
||||
boost::mutex walMutex;
|
||||
std::set<std::string> walDBs;
|
||||
bool walRunning;
|
||||
|
||||
public:
|
||||
SqliteDatabase(const char* host);
|
||||
|
||||
@@ -38,6 +49,12 @@ public:
|
||||
int getBinary(int colIndex,unsigned char* buf,int maxSize);
|
||||
std::vector<unsigned char> getBinary(int colIndex);
|
||||
uint64 getBigInt(int colIndex);
|
||||
|
||||
sqlite3* peekConnection() { return mConnection; }
|
||||
virtual bool setupCheckpointing();
|
||||
|
||||
void runWal();
|
||||
void doHook(const char *db, int walSize);
|
||||
};
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user