ClickHouse / ClickHouse/ClickHouse
deduplication_path for attach/replace should include src table name
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
### Company or project name
_No response_
### Describe the unexpected behaviour
https://github.com/ClickHouse/ClickHouse/blob/131ef1d5bc85e8abff29a1fda82ed59ab398615a/src/Storages/StorageReplicatedMergeTree.cpp#L9065
```
2026.05.15 12:07:30.438526 [ 32 ] {} createEphemeralLockInZooKeeper: Deduplication path already exists: deduplication_path=/clickhouse/tables/dest_table_uuid/0/blocks/[partition_id]_replace_from_[part_checksum_hash]
```
Dedup hash should include SRC table uuid/name
### Which ClickHouse versions are affected?
All
### How to reproduce
1. Attach part with the same data from one table
2. Attach part with the same data from another table
Second attach is deduplicated, despite it different statement and therefore no sense to have it deduplicated.
### Expected behavior
_No response_
### Error message and/or stacktrace
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.