[
https://issues.apache.org/jira/browse/CASSANDRA-17181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17453946#comment-17453946
]
Benjamin Lerer commented on CASSANDRA-17181:
--------------------------------------------
[~bkowalczyyk] You are right. I was looking at a snapshot of the code from when
CASSANDRA-14825 was committed (shame on me). To make the matter worst, I was
reviewer of the fix CASSANDRA-13935 :-(. All my apologizes for that.
So the problem is fixed but looking at the 4.0 code it seems that the
{{SchemaCQLHelper}} methods are having a set of boolean parameters that are
never used (as I would have expected) as they are always called with {{true}}.
The only call that do not use true seems to be a useless one.
If you are interested in cleaning that I can update the ticket to reflect the
new goal (or create a new one). Otherwise I am sure that can I find you
something else to play with :-)
> schema.cql should have IF NOT EXISTS for CREATE TYPE
> ----------------------------------------------------
>
> Key: CASSANDRA-17181
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17181
> Project: Cassandra
> Issue Type: Bug
> Components: Local/Snapshots
> Reporter: Benjamin Lerer
> Priority: Normal
> Labels: AdventCalendar2021, lhf
> Fix For: 3.0.x, 3.11.x, 4.0.x
>
>
> When a schema.cql is created during a snapshot, {{CREATE TYPE}} statements
> are not created with {{IF NOT EXISTS}} as the {{CREATE TABLE}} statements.
> This can cause some issues when using those statements during restore.
> Additional Information for newcomers:
> In 3.0 and 3.11 the code use to generate the {{schema.cql}} file is in
> {{TableCQLHelper}} and the unit tests in {{TableCQLHelperTest}}.
> In 4.0 the bug does not exist anymore but the test {{SchemaCQLHelperTest}}
> does not test the correct behavior and the code could be simplified
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]