You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-10 01:22:48 +03:00
Merge pull request #516 from mariadb-corporation/MCOL-1037
MCOL-1037 Fix race condition in FIFO buffer
This commit is contained in:
@@ -345,17 +345,27 @@ void FIFO<element_t>::signalPs()
|
||||
template<typename element_t>
|
||||
inline bool FIFO<element_t>::next(uint64_t id, element_t *out)
|
||||
{
|
||||
base::mutex.lock();
|
||||
fConsumptionStarted = true;
|
||||
if (cpos[id] >= fMaxElements)
|
||||
{
|
||||
base::mutex.unlock();
|
||||
if (!waitForSwap(id))
|
||||
return false;
|
||||
base::mutex.lock();
|
||||
}
|
||||
|
||||
*out = cBuffer[cpos[id]++];
|
||||
|
||||
#ifndef ONE_CS
|
||||
if (cpos[id] == fMaxElements)
|
||||
{
|
||||
base::mutex.unlock();
|
||||
signalPs();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
base::mutex.unlock();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -65,8 +65,6 @@ inline uint64_t order_swap(uint64_t x)
|
||||
template <int W>
|
||||
inline string fixChar(int64_t intval);
|
||||
|
||||
idb_regex_t placeholderRegex;
|
||||
|
||||
template <class T>
|
||||
inline int compareBlock( const void * a, const void * b )
|
||||
{
|
||||
@@ -954,6 +952,7 @@ inline void p_Col_ridArray(NewColRequestHeader *in,
|
||||
uint16_t *ridArray=0;
|
||||
uint8_t *in8 = reinterpret_cast<uint8_t *>(in);
|
||||
const uint8_t filterSize = sizeof(uint8_t) + sizeof(uint8_t) + W;
|
||||
idb_regex_t placeholderRegex;
|
||||
|
||||
placeholderRegex.used = false;
|
||||
|
||||
|
Reference in New Issue
Block a user