[ 
https://issues.apache.org/jira/browse/CASSANDRA-20218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17916758#comment-17916758
 ] 

Sam Tunnicliffe commented on CASSANDRA-20218:
---------------------------------------------

[~smiklosovic] The additional check for {{CopyTableStatement}} isn't necessary 
and in fact it subtly changes the way that statement is working. 
The issue being addressed here is caused by the fact that in the case of 
{{CreateKeyspaceStatement/CreateTableStatement/CreateIndexStatement}} what we 
serialize into the metadata log entry isn't actually the input CQL, but an 
augmented/expanded version of it. For {{CopyTableStatement}}, this isn't the 
case and the log entry does contain the input CQL, i.e. the {{CREATE TABLE foo 
LIKE bar}} string. The change in your PR makes it so that a fully synthetic 
{{CREATE TABLE bar...}} would be what was committed to the log. The ultimate 
effect would be the same of course, a table {{bar}} would be created with the 
same properties either way, but the fact that it was the result of copying an 
existing table {{foo}} would be erased. 


> Make sure we can parse the expanded CQL before writing it to the log or 
> sending it to replicas
> ----------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-20218
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20218
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Transactional Cluster Metadata
>            Reporter: Marcus Eriksson
>            Assignee: Marcus Eriksson
>            Priority: Normal
>             Fix For: 5.x
>
>         Attachments: ci_summary.html
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When executing a {{create keyspace}}/{{create table}}/{{create index}} we 
> expand the CQL before sending it to replicas. We should make sure that we can 
> still parse this expanded CQL before writing it to the log. Otherwise, if 
> there is a bug in the {{toCqlString}} method, the replicas could never apply 
> the transformation and we could make no progress.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to