Skip to content

Commit a39d63a

Browse files
committed
remove old partition task
1 parent 34f7130 commit a39d63a

File tree

4 files changed

+6
-340
lines changed

4 files changed

+6
-340
lines changed

src/Core/Settings.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6877,9 +6877,6 @@ Experimental timeSeries* aggregate functions for Prometheus-like timeseries resa
68776877
DECLARE_WITH_ALIAS(Bool, allow_experimental_export_merge_tree_partition, false, R"(
68786878
Experimental export merge tree partition.
68796879
)", EXPERIMENTAL, allow_experimental_export_merge_tree_partition) \
6880-
DECLARE_WITH_ALIAS(Bool, export_merge_tree_partition_executor, false, R"(
6881-
Use the part task instead of the partition task
6882-
)", EXPERIMENTAL, export_merge_tree_partition_executor) \
68836880
\
68846881
/* ####################################################### */ \
68856882
/* ############ END OF EXPERIMENTAL FEATURES ############# */ \

src/Storages/ObjectStorage/MergeTree/ExportPartitionPlainMergeTreeTask.cpp

Lines changed: 0 additions & 221 deletions
This file was deleted.

src/Storages/ObjectStorage/MergeTree/ExportPartitionPlainMergeTreeTask.h

Lines changed: 0 additions & 70 deletions
This file was deleted.

src/Storages/StorageMergeTree.cpp

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
#include "Core/BackgroundSchedulePool.h"
5050
#include "Storages/ObjectStorage/MergeTree/ExportPartPlainMergeTreeTask.h"
5151
#include <Core/Names.h>
52-
#include <Storages/ObjectStorage/MergeTree/ExportPartitionPlainMergeTreeTask.h>
5352
#include <Storages/ObjectStorage/StorageObjectStorage.h>
5453
#include <Functions/generateSnowflakeID.h>
5554
#include <Storages/ObjectStorage/MergeTree/StorageObjectStorageMergeTreePartImporterSink.h>
@@ -82,7 +81,6 @@ namespace Setting
8281
extern const SettingsBool throw_on_unsupported_query_inside_transaction;
8382
extern const SettingsUInt64 max_parts_to_move;
8483
extern const SettingsBool allow_experimental_export_merge_tree_partition;
85-
extern const SettingsBool export_merge_tree_partition_executor;
8684
}
8785

8886
namespace MergeTreeSetting
@@ -576,27 +574,10 @@ void StorageMergeTree::exportPartitionToTable(const PartitionCommand & command,
576574
export_partition_transaction_id_to_manifest[transaction_id] = manifest;
577575
}
578576

579-
if (!getContext()->getSettingsRef()[Setting::export_merge_tree_partition_executor])
577+
for (const auto & part : all_parts)
580578
{
581-
for (const auto & part : all_parts)
582-
{
583-
auto tagger = std::make_shared<CurrentlyExportingPartsTagger>(std::vector<DataPartPtr>{part}, *this);
584-
auto task = std::make_shared<ExportPartPlainMergeTreeTask>(*this, tagger, dest_storage, getContext(), manifest, moves_assignee_trigger);
585-
background_moves_assignee.scheduleMoveTask(task);
586-
}
587-
}
588-
else
589-
{
590-
auto exports_tagger = std::make_shared<CurrentlyExportingPartsTagger>(std::move(all_parts), *this);
591-
592-
auto task = std::make_shared<ExportPartitionPlainMergeTreeTask>(
593-
*this,
594-
exports_tagger,
595-
dest_storage,
596-
getContext(),
597-
manifest,
598-
moves_assignee_trigger);
599-
579+
auto tagger = std::make_shared<CurrentlyExportingPartsTagger>(std::vector<DataPartPtr>{part}, *this);
580+
auto task = std::make_shared<ExportPartPlainMergeTreeTask>(*this, tagger, dest_storage, getContext(), manifest, moves_assignee_trigger);
600581
background_moves_assignee.scheduleMoveTask(task);
601582
}
602583
}
@@ -1247,33 +1228,12 @@ void StorageMergeTree::resumeExportPartitionTasks()
12471228
parts_to_export.emplace_back(part);
12481229
}
12491230

1250-
if (!getContext()->getSettingsRef()[Setting::export_merge_tree_partition_executor])
1231+
for (const auto & part : parts_to_export)
12511232
{
1252-
for (const auto & part : parts_to_export)
1253-
{
1254-
auto tagger = std::make_shared<CurrentlyExportingPartsTagger>(std::vector<DataPartPtr>{part}, *this);
1255-
auto task = std::make_shared<ExportPartPlainMergeTreeTask>(*this, tagger, destination_storage, getContext(), manifest, moves_assignee_trigger);
1256-
background_moves_assignee.scheduleMoveTask(task);
1257-
}
1258-
}
1259-
else
1260-
{
1261-
/// TODO: this locks the parts that have not been exported yet. Should we also lock the already exported parts as well?
1262-
/// There is some inconsistency with in-progress exports. The parts will not be unlocked until all parts have been exported OR a re-start happens
1263-
/// I just checked and mutations handle it slightly different. Tagger will actually contain a single part, which is released as soon as it finishes.
1264-
auto exports_tagger = std::make_shared<CurrentlyExportingPartsTagger>(std::move(parts_to_export), *this);
1265-
1266-
auto task = std::make_shared<ExportPartitionPlainMergeTreeTask>(
1267-
*this,
1268-
exports_tagger,
1269-
destination_storage,
1270-
getContext(),
1271-
manifest,
1272-
moves_assignee_trigger);
1273-
1233+
auto tagger = std::make_shared<CurrentlyExportingPartsTagger>(std::vector<DataPartPtr>{part}, *this);
1234+
auto task = std::make_shared<ExportPartPlainMergeTreeTask>(*this, tagger, destination_storage, getContext(), manifest, moves_assignee_trigger);
12741235
background_moves_assignee.scheduleMoveTask(task);
12751236
}
1276-
12771237
}
12781238
}
12791239

0 commit comments

Comments
 (0)