1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-15 12:09:09 +03:00

Changed Sync s.t. it starts processing jobs every 10 seconds instead

of every time there's an event.  Big improvement in efficiency.
This commit is contained in:
Patrick LeBlanc
2019-04-25 12:07:30 -05:00
parent fc717886c6
commit 1ee3c760b1
2 changed files with 33 additions and 8 deletions

View File

@@ -7,6 +7,7 @@
#include <deque>
#include <boost/utility.hpp>
#include <boost/filesystem.hpp>
#include <boost/chrono.hpp>
#include "SMLogging.h"
#include "Replicator.h"
@@ -76,6 +77,13 @@ class Synchronizer : public boost::noncopyable
// in general the code got kludgier b/c of renaming, needs a cleanup pass.
std::list<std::string> objNames;
// this thread will start jobs for entries in pendingOps every 10 seconds
bool die;
boost::thread syncThread;
const boost::chrono::seconds syncInterval = boost::chrono::seconds(10);
void periodicSync();
SMLogging *logger;
Cache *cache;
Replicator *replicator;