mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
Turn off tasks stealing for remote disk
This commit is contained in:
parent
eb5cb86271
commit
aa4b797808
@ -95,6 +95,8 @@ public:
|
||||
|
||||
virtual bool isStoredOnDisk() const = 0;
|
||||
|
||||
virtual bool isStoredOnRemoteDisk() const = 0;
|
||||
|
||||
virtual bool supportsVerticalMerge() const { return false; }
|
||||
|
||||
/// NOTE: Returns zeros if column files are not found in checksums.
|
||||
|
@ -182,6 +182,11 @@ void MergeTreeDataPartCompact::checkConsistency(bool require_part_metadata) cons
|
||||
}
|
||||
}
|
||||
|
||||
bool MergeTreeDataPartCompact::isStoredOnRemoteDisk() const
|
||||
{
|
||||
return volume->getDisk()->isRemote();
|
||||
}
|
||||
|
||||
MergeTreeDataPartCompact::~MergeTreeDataPartCompact()
|
||||
{
|
||||
removeIfNeeded();
|
||||
|
@ -56,6 +56,8 @@ public:
|
||||
|
||||
bool isStoredOnDisk() const override { return true; }
|
||||
|
||||
bool isStoredOnRemoteDisk() const override;
|
||||
|
||||
bool hasColumnFiles(const NameAndTypePair & column) const override;
|
||||
|
||||
String getFileNameForColumn(const NameAndTypePair & /* column */) const override { return DATA_FILE_NAME; }
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
const MergeTreeIndexGranularity & computed_index_granularity) const override;
|
||||
|
||||
bool isStoredOnDisk() const override { return false; }
|
||||
bool isStoredOnRemoteDisk() const override { return false; }
|
||||
bool hasColumnFiles(const NameAndTypePair & column) const override { return !!getColumnPosition(column.name); }
|
||||
String getFileNameForColumn(const NameAndTypePair & /* column */) const override { return ""; }
|
||||
void renameTo(const String & new_relative_path, bool remove_new_dir_if_exists) const override;
|
||||
|
@ -142,6 +142,11 @@ void MergeTreeDataPartWide::loadIndexGranularity()
|
||||
index_granularity.setInitialized();
|
||||
}
|
||||
|
||||
bool MergeTreeDataPartWide::isStoredOnRemoteDisk() const
|
||||
{
|
||||
return volume->getDisk()->isRemote();
|
||||
}
|
||||
|
||||
MergeTreeDataPartWide::~MergeTreeDataPartWide()
|
||||
{
|
||||
removeIfNeeded();
|
||||
|
@ -50,6 +50,8 @@ public:
|
||||
|
||||
bool isStoredOnDisk() const override { return true; }
|
||||
|
||||
bool isStoredOnRemoteDisk() const override;
|
||||
|
||||
bool supportsVerticalMerge() const override { return true; }
|
||||
|
||||
String getFileNameForColumn(const NameAndTypePair & column) const override;
|
||||
|
@ -221,6 +221,10 @@ std::vector<size_t> MergeTreeReadPool::fillPerPartInfo(
|
||||
{
|
||||
const auto & part = parts[i];
|
||||
|
||||
/// Turn off tasks stealing in case there is remote disk.
|
||||
if (part.data_part->isStoredOnRemoteDisk())
|
||||
do_not_steal_tasks = true;
|
||||
|
||||
/// Read marks for every data part.
|
||||
size_t sum_marks = 0;
|
||||
for (const auto & range : part.ranges)
|
||||
|
Loading…
Reference in New Issue
Block a user