This commit is contained in:
Michael Kolupaev 2012-11-28 17:17:17 +00:00
parent 58a4dc8d2d
commit 912cf7c4eb
2 changed files with 2 additions and 5 deletions

View File

@ -151,7 +151,7 @@ private:
/// Описание куска с данными.
struct DataPart
{
DataPart(StorageMergeTree & storage_) : storage(storage_) {}
DataPart(StorageMergeTree & storage_) : storage(storage_), currently_merging(false) {}
StorageMergeTree & storage;
Yandex::DayNum_t left_date;

View File

@ -1234,7 +1234,7 @@ void StorageMergeTree::merge(size_t iterations, bool async)
iterations = settings.merging_threads;
}
for (size_t i = 0; i < settings.merging_threads; ++i)
for (size_t i = 0; i < iterations; ++i)
merge_threads->schedule(boost::bind(&StorageMergeTree::mergeThread, this, while_can));
if (!async)
@ -1246,9 +1246,6 @@ void StorageMergeTree::mergeThread(bool while_can)
{
try
{
DataPartPtr left;
DataPartPtr right;
std::vector<DataPartPtr> parts;
while (selectPartsToMerge(parts))
{