New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right argument of IN
is evaluated in a column default expression in 22.10+
#44496
Comments
Note that if the table was originally created in 22.9 or previous, you updated the whole cluster and now try to add a new replica it won't work either:
|
It seems #42106 might have changed (and broken) replication when the columns use *Get functions. cc @tavplubix |
It was not intended and it's a bug. The idea was to replace expressions like It's not really a compatibility issue, it's just a bug that leads to broken metadata. It's easy to add a new replica using a new version:
so metadata will match. |
Understood. Also note that in the case where the table was created in a previous version (and the metadata matches the table declaration without replaces), the solution is to add the replica with an older release and then upgrade it instead of adding the replica with the new version directly. |
IN
is evaluated in a column default expression in 22.10+
Describe the issue
When you add a new replica to a table using certain operations (joinGet in the definition in this example), but values of the table might be leaked into the ZK definition leading to issues when creating a table.
How to reproduce
Setup
2 replicas
1 cluster (in this case called tinybird)
In the first replica we execute:
The above has created a database
upgrade_problem
on cluster and a join table, also on cluster.Now in the first replica we add data:
And we also create a new table that uses this info (not created on cluster, only in the server1):
Now we go into server2 and add the replica manually (not via on cluster):
Results:
Example error:
For some reason the definition comparison between the 2 servers has replaced
joinGet('upgrade_problem.id_join', 'location', 'CLICK')
by its result. Since the result is different ([1234]
vs[]
), the comparison fails.This breaks adding new replicas. Note that this also happens, and it's made 10x worse, even when the data matches but the new replica is newer.
For example, if you create the first replica with 22.9 and then add a new one with 22.12 you will get this error:
Even if you match the data the definition still changes:
Note the diff where it was [] above and [1234] after adding the data.
This to me is a major breaking compatibility issue as you are unable to add new replicas to existing clusters anymore.
The text was updated successfully, but these errors were encountered: