More fixes

This commit is contained in:
Amos Bird 2021-09-25 13:38:56 +08:00
parent 23d3d894e6
commit 34017c942e
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
3 changed files with 18 additions and 15 deletions

View File

@ -23,12 +23,12 @@ public:
TableLockHolder table_lock_holder_,
Callback && task_result_callback_)
: storage(storage_)
, metadata_snapshot(metadata_snapshot_)
, metadata_snapshot(std::move(metadata_snapshot_))
, deduplicate(deduplicate_)
, deduplicate_by_columns(deduplicate_by_columns_)
, merge_mutate_entry(merge_mutate_entry_)
, table_lock_holder(table_lock_holder_)
, task_result_callback(task_result_callback_) {}
, deduplicate_by_columns(std::move(deduplicate_by_columns_))
, merge_mutate_entry(std::move(merge_mutate_entry_))
, table_lock_holder(std::move(table_lock_holder_))
, task_result_callback(std::forward<Callback>(task_result_callback_)) {}
bool executeStep() override;

View File

@ -27,13 +27,13 @@ public:
StorageMergeTree & storage_,
StorageMetadataPtr metadata_snapshot_,
MergeMutateSelectedEntryPtr merge_mutate_entry_,
TableLockHolder & table_lock_holder_,
TableLockHolder table_lock_holder_,
Callback && task_result_callback_)
: storage(storage_)
, metadata_snapshot(metadata_snapshot_)
, merge_mutate_entry(merge_mutate_entry_)
, table_lock_holder(table_lock_holder_)
, task_result_callback(task_result_callback_) {}
, metadata_snapshot(std::move(metadata_snapshot_))
, merge_mutate_entry(std::move(merge_mutate_entry_))
, table_lock_holder(std::move(table_lock_holder_))
, task_result_callback(std::forward<Callback>(task_result_callback_)) {}
bool executeStep() override;
@ -60,7 +60,7 @@ private:
StorageMetadataPtr metadata_snapshot;
MergeMutateSelectedEntryPtr merge_mutate_entry{nullptr};
TableLockHolder & table_lock_holder;
TableLockHolder table_lock_holder;
FutureMergedMutatedPartPtr future_part{nullptr};
std::unique_ptr<Stopwatch> stopwatch;

View File

@ -1035,7 +1035,8 @@ bool StorageMergeTree::scheduleDataProcessingJob(BackgroundJobsAssignee & assign
if (merge_entry)
{
auto task = std::make_shared<MergePlainMergeTreeTask>(*this, metadata_snapshot, false, Names{}, merge_entry, share_lock, common_assignee_trigger);
auto task = std::make_shared<MergePlainMergeTreeTask>(
*this, metadata_snapshot, false, Names{}, merge_entry, share_lock, common_assignee_trigger);
assignee.scheduleMergeMutateTask(task);
return true;
}
@ -1054,7 +1055,8 @@ bool StorageMergeTree::scheduleDataProcessingJob(BackgroundJobsAssignee & assign
}
bool scheduled = false;
if (time_after_previous_cleanup_temporary_directories.compareAndRestartDeferred(getContext()->getSettingsRef().merge_tree_clear_old_temporary_directories_interval_seconds))
if (time_after_previous_cleanup_temporary_directories.compareAndRestartDeferred(
getContext()->getSettingsRef().merge_tree_clear_old_temporary_directories_interval_seconds))
{
assignee.scheduleMergeMutateTask(ExecutableLambdaAdapter::create(
[this, share_lock] ()
@ -1064,7 +1066,8 @@ bool StorageMergeTree::scheduleDataProcessingJob(BackgroundJobsAssignee & assign
}, common_assignee_trigger, getStorageID()));
scheduled = true;
}
if (auto lock = time_after_previous_cleanup_parts.compareAndRestartDeferred(getContext()->getSettingsRef().merge_tree_clear_old_parts_interval_seconds))
if (auto lock = time_after_previous_cleanup_parts.compareAndRestartDeferred(
getContext()->getSettingsRef().merge_tree_clear_old_parts_interval_seconds))
{
assignee.scheduleMergeMutateTask(ExecutableLambdaAdapter::create(
[this, share_lock] ()