1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00
This commit is contained in:
david hill
2016-10-24 17:53:58 -05:00
3 changed files with 29 additions and 18 deletions

View File

@@ -347,11 +347,19 @@ void TupleAggregateStep::doThreadedSecondPhaseAggregate(uint32_t threadID)
for (uint32_t c = 0; c < fNumOfBuckets && !cancelled(); c++)
{
if (!bucketDone[c] && fAgg_mutex[c]->try_lock())
{
try
{
if (multiDist)
dynamic_cast<RowAggregationMultiDistinct*>(fAggregators[c].get())->doDistinctAggregation_rowVec(rowBucketVecs[c]);
else
dynamic_cast<RowAggregationDistinct*>(fAggregators[c].get())->doDistinctAggregation_rowVec(rowBucketVecs[c][0]);
}
catch(...)
{
fAgg_mutex[c]->unlock();
throw;
}
fAgg_mutex[c]->unlock();
bucketDone[c] = true;
rowBucketVecs[c][0].clear();
@@ -4300,12 +4308,20 @@ void TupleAggregateStep::threadedAggregateRowGroups(uint32_t threadID)
for (uint32_t c = 0; c < fNumOfBuckets && !cancelled(); c++)
{
if (!fEndOfResult && !bucketDone[c] && fAgg_mutex[c]->try_lock())
{
try
{
didWork = true;
if (multiDist)
dynamic_cast<RowAggregationMultiDistinct*>(fAggregators[c].get())->addRowGroup(&fRowGroupIns[threadID], rowBucketVecs[c]);
else
fAggregators[c]->addRowGroup(&fRowGroupIns[threadID], rowBucketVecs[c][0]);
}
catch(...)
{
fAgg_mutex[c]->unlock();
throw;
}
fAgg_mutex[c]->unlock();
rowBucketVecs[c][0].clear();
bucketDone[c] = true;

View File

@@ -39,6 +39,8 @@ read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 0
# Disable client progress reports. More people are annoyed by it than not.
progress_report_time=0
# Try number of CPU's*2 for thread_concurrency
#thread_concurrency = 8
thread_stack = 512K

View File

@@ -4644,9 +4644,7 @@ namespace oam
if (!file.is_open())
{
ostringstream os;
os << "checkLogStatus error while opening file " << fileName << " " << strerror(errno);
writeLog(os.str(), LOG_TYPE_ERROR );
return false;
}
string buf;
@@ -4659,14 +4657,9 @@ namespace oam
}
if (file.bad())
{
ostringstream os;
os << "checkLogStatus error while reading file " << fileName << " " << strerror(errno);
writeLog(os.str(), LOG_TYPE_ERROR );
return false;
}
file.close();
ostringstream os;
os << "checkLogStatus failed " << fileName << " expected \"" << phrase.c_str() << "\" found \"" << buf.c_str() << "\"";
writeLog(os.str(), LOG_TYPE_ERROR );
return false;
}