[fix] add changelog; change some feature logic

This commit is contained in:
unashi 2024-02-20 20:31:59 +08:00
parent 8de4a9dbfd
commit 6437877a71
4 changed files with 9 additions and 6 deletions

View File

@ -42,6 +42,7 @@
* Added `FROM <Replicas>` modifier for `SYSTEM SYNC REPLICA LIGHTWEIGHT` query. With the `FROM` modifier ensures we wait for fetches and drop-ranges only for the specified source replicas, as well as any replica not in zookeeper or with an empty source_replica. [#58393](https://github.com/ClickHouse/ClickHouse/pull/58393) ([Jayme Bird](https://github.com/jaymebrd)).
* Added setting `update_insert_deduplication_token_in_dependent_materialized_views`. This setting allows to update insert deduplication token with table identifier during insert in dependent materialized views. Closes [#59165](https://github.com/ClickHouse/ClickHouse/issues/59165). [#59238](https://github.com/ClickHouse/ClickHouse/pull/59238) ([Maksim Kita](https://github.com/kitaisreal)).
* Added statement `SYSTEM RELOAD ASYNCHRONOUS METRICS` which updates the asynchronous metrics. Mostly useful for testing and development. [#53710](https://github.com/ClickHouse/ClickHouse/pull/53710) ([Robert Schulze](https://github.com/rschu1ze)).
* Attach parts from a different disk `ALTER TABLE destination ATTACH PARTITION tuple() FROM source` where source is an [instant table](https://github.com/ClickHouse/web-tables-demo). [#60112](https://github.com/ClickHouse/ClickHouse/pull/60112)([Unalian](https://github.com/Unalian)).
#### Performance Improvement
* Coordination for parallel replicas is rewritten for better parallelism and cache locality. It has been tested for linear scalability on hundreds of replicas. It also got support for reading in order. [#57968](https://github.com/ClickHouse/ClickHouse/pull/57968) ([Nikita Taranov](https://github.com/nickitat)).

View File

@ -8,6 +8,7 @@
#include <Backups/BackupEntryWrappedWith.h>
#include <Backups/IBackup.h>
#include <Backups/RestorerFromBackup.h>
#include "Common/logger_useful.h"
#include <Common/Config/ConfigHelper.h>
#include <Common/CurrentMetrics.h>
#include <Common/Increment.h>
@ -7170,7 +7171,9 @@ std::pair<MergeTreeData::MutableDataPartPtr, scope_guard> MergeTreeData::cloneAn
}
}
if (!copy_successful)
throw;
{
LOG_FATAL(&Poco::Logger::get("MergeTreeData"), "Hard link fail, clone fail");
}
}
@ -7301,8 +7304,9 @@ std::pair<MergeTreeData::MutableDataPartPtr, scope_guard> MergeTreeData::cloneAn
}
}
if (!copy_successful)
throw;
{
LOG_FATAL( &Poco::Logger::get("MergeTreeData"), "Hard link fail, clone fail.");
}
if (params.metadata_version_to_write.has_value())
{
chassert(!params.keep_metadata_version);

View File

@ -2104,7 +2104,6 @@ void StorageMergeTree::replacePartitionFrom(const StoragePtr & source_table, con
}
else
{
clone_params.copy_instead_of_hardlink = true;
auto [dst_part, part_lock] = cloneAndLoadDataPartOnOtherDisk(
src_part,
TMP_PREFIX,

View File

@ -7933,7 +7933,7 @@ void StorageReplicatedMergeTree::replacePartitionFrom(
for (const DiskPtr & disk : this->getStoragePolicy()->getDisks())
if (disk->getName() == src_part->getDataPartStorage().getDiskName())
on_same_disk = true;
if (on_same_disk)
if (on_same_disk && !clone_params.copy_instead_of_hardlink)
{
auto [dst_part, part_lock] = cloneAndLoadDataPartOnSameDisk(
src_part,
@ -7948,7 +7948,6 @@ void StorageReplicatedMergeTree::replacePartitionFrom(
}
else
{
clone_params.copy_instead_of_hardlink = true;
auto [dst_part, part_lock] = cloneAndLoadDataPartOnOtherDisk(
src_part,
TMP_PREFIX,