1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Revert "No boost condition (#2822)" (#2828)

This reverts commit f916e64927.
This commit is contained in:
Roman Nozdrin
2023-04-22 13:49:50 +01:00
committed by GitHub
parent f916e64927
commit 4fe9cd64a3
245 changed files with 2007 additions and 1261 deletions

View File

@ -31,8 +31,6 @@
* ColumnBufferCompressed.
*/
#include "we_colbufmgr.h"
#include "we_colbuf.h"
#include "we_colbufcompressed.h"
@ -40,10 +38,8 @@
#include "we_bulkstatus.h"
#include "we_log.h"
#include "blocksize.h"
#include <chrono>
#include <sstream>
#include <boost/date_time/posix_time/posix_time_types.hpp>
namespace
{
@ -127,9 +123,9 @@ int ColumnBufferManager::reserveSection(RID startRowId, uint32_t nRowsIn, uint32
Stats::startParseEvent(WE_STATS_WAIT_TO_RESERVE_OUT_BUF);
#endif
*cbs = 0;
std::chrono::seconds wait_seconds(COND_WAIT_SECONDS);
boost::posix_time::seconds wait_seconds(COND_WAIT_SECONDS);
std::unique_lock lock(fColInfo->colMutex());
boost::mutex::scoped_lock lock(fColInfo->colMutex());
//..Ensure that ColumnBufferSection allocations are made in input row order
bool bWaitedForInSequence = false;
@ -149,7 +145,7 @@ int ColumnBufferManager::reserveSection(RID startRowId, uint32_t nRowsIn, uint32
fLog->logMsg(oss.str(), MSGLVL_INFO2);
}
fOutOfSequence.wait_for(lock, wait_seconds);
fOutOfSequence.timed_wait(lock, wait_seconds);
// See if JobStatus has been set to terminate by another thread
if (BulkStatus::getJobStatus() == EXIT_FAILURE)
@ -183,7 +179,7 @@ int ColumnBufferManager::reserveSection(RID startRowId, uint32_t nRowsIn, uint32
fLog->logMsg(oss.str(), MSGLVL_INFO2);
}
fResizeInProgress.wait_for(lock, wait_seconds);
fResizeInProgress.timed_wait(lock, wait_seconds);
// See if JobStatus has been set to terminate by another thread
if (BulkStatus::getJobStatus() == EXIT_FAILURE)
@ -257,7 +253,7 @@ int ColumnBufferManager::reserveSection(RID startRowId, uint32_t nRowsIn, uint32
fLog->logMsg(oss.str(), MSGLVL_INFO2);
}
fBufInUse.wait_for(lock, wait_seconds);
fBufInUse.timed_wait(lock, wait_seconds);
// See if JobStatus has been set to quit by another thread
if (BulkStatus::getJobStatus() == EXIT_FAILURE)
@ -334,7 +330,7 @@ int ColumnBufferManager::releaseSection(ColumnBufferSection* cbs)
#ifdef PROFILE
Stats::startParseEvent(WE_STATS_WAIT_TO_RELEASE_OUT_BUF);
#endif
std::unique_lock lock(fColInfo->colMutex());
boost::mutex::scoped_lock lock(fColInfo->colMutex());
#ifdef PROFILE
Stats::stopParseEvent(WE_STATS_WAIT_TO_RELEASE_OUT_BUF);
#endif
@ -679,8 +675,8 @@ int ColumnBufferManager::flush()
//------------------------------------------------------------------------------
int ColumnBufferManager::intermediateFlush()
{
std::chrono::seconds wait_seconds(COND_WAIT_SECONDS);
std::unique_lock lock(fColInfo->colMutex());
boost::posix_time::seconds wait_seconds(COND_WAIT_SECONDS);
boost::mutex::scoped_lock lock(fColInfo->colMutex());
// Wait for all other threads which are currently parsing rows,
// to finish parsing the data in those sections.
@ -690,7 +686,7 @@ int ColumnBufferManager::intermediateFlush()
while (fSectionsInUse.size() > 0)
{
fBufInUse.wait_for(lock, wait_seconds);
fBufInUse.timed_wait(lock, wait_seconds);
// See if JobStatus has been set to terminate by another thread
if (BulkStatus::getJobStatus() == EXIT_FAILURE)
@ -733,7 +729,7 @@ int ColumnBufferManager::rowsExtentCheck(int nRows, int& nRows2)
//------------------------------------------------------------------------------
int ColumnBufferManager::extendTokenColumn()
{
std::unique_lock lock(fColInfo->colMutex());
boost::mutex::scoped_lock lock(fColInfo->colMutex());
return fColInfo->extendColumn(false);
}