You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-18 13:54:11 +03:00
Add sync forceFlush and modified unit_test to be in working state again.
This commit is contained in:
16
src/Synchronizer.cpp
Normal file → Executable file
16
src/Synchronizer.cpp
Normal file → Executable file
@@ -205,7 +205,14 @@ void Synchronizer::periodicSync()
|
||||
while (!die)
|
||||
{
|
||||
lock.unlock();
|
||||
boost::this_thread::sleep_for(syncInterval);
|
||||
try
|
||||
{
|
||||
boost::this_thread::sleep_for(syncInterval);
|
||||
}
|
||||
catch (const boost::thread_interrupted)
|
||||
{
|
||||
//logger->log(LOG_DEBUG,"Synchronizer Force Flush.");
|
||||
}
|
||||
lock.lock();
|
||||
//cout << "Sync'ing " << pendingOps.size() << " objects" << " queue size is " <<
|
||||
// threadPool.currentQueueSize() << endl;
|
||||
@@ -214,6 +221,13 @@ void Synchronizer::periodicSync()
|
||||
}
|
||||
}
|
||||
|
||||
void Synchronizer::forceFlush()
|
||||
{
|
||||
boost::unique_lock<boost::mutex> lock(mutex);
|
||||
syncThread.interrupt();
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
void Synchronizer::makeJob(const string &key)
|
||||
{
|
||||
objNames.push_front(key);
|
||||
|
||||
Reference in New Issue
Block a user