ClickHouse / ClickHouse/ClickHouse
ALTER TABLE COMMENT COLUMN for Materialized View with ReplicatedAggregatingMergeTree engine doesn't propagate to all replicas.
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 20h 33m
- Merged PRs (30d)
- 501
Description
**Describe the issue**
When you do an `ALTER TABLE COMMENT COLUMN` for a ReplicatedMergeTree table, it propagates the comment as expected.
If you've built a Materialized View on top of this ReplicatedMergeTree table using the ReplicatedAggregatingMergeTree engine, and attempt to do a similar `ALTER TABLE COMMENT COLUMN` operation, it does not propagate to it's replicas.
**How to reproduce**
- Create a ReplicatedMergeTree raw data table with 3 replicas.
- Create a ReplicatedAggregatingMergeTree Materialized View which references the raw data table created above.
- Create a migration which issues an ALTER TABLE COMMENT COLUMN on the Materialized View.
- Observe that the COMMENT COLUMN migration is only applied to one replica and not propegated to the other replicas.
**Expected behavior**
ALTER TABLE COMMENT COLUMN is replicated for Materialized Views that use replicated table engines.
**Error message and/or stacktrace**
If you're trying to recover from failure, you'll get this kind of message when trying to reapply the schema to a node:
```
DB::Exception: Table structure in ZooKeeper is too different from local table structure.
```
**Additional context**
We're on version 19.9.2.4 and ran into this while working on upgrading to a more recent version.
Contributor guide
Assessment
This issue has not been assessed yet.