[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15031585#comment-15031585 ] Olivier Michallat commented on CASSANDRA-7910: -- Created CASSANDRA-10786. > wildcard prepared statements are incorrect after a column is added to the > table > --- > > Key: CASSANDRA-7910 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 > Project: Cassandra > Issue Type: Bug >Reporter: Oded Peer >Assignee: Tyler Hobbs >Priority: Minor > Labels: client-impacting > Fix For: 2.1.3 > > Attachments: 7910-2.1.txt, 7910-trunk.txt, > PreparedStatementAfterAddColumnTest.java > > > 1. Prepare a statement with a wildcard in the select clause. > 2. Alter the table - add a column > 3. execute the prepared statement > Expected result - get all the columns including the new column > Actual result - get the columns except the new column > Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15028357#comment-15028357 ] Sylvain Lebresne commented on CASSANDRA-7910: - That's an idea worth discussing but please open a separate ticket for this or this'll fall through the cracks. > wildcard prepared statements are incorrect after a column is added to the > table > --- > > Key: CASSANDRA-7910 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 > Project: Cassandra > Issue Type: Bug >Reporter: Oded Peer >Assignee: Tyler Hobbs >Priority: Minor > Labels: client-impacting > Fix For: 2.1.3 > > Attachments: 7910-2.1.txt, 7910-trunk.txt, > PreparedStatementAfterAddColumnTest.java > > > 1. Prepare a statement with a wildcard in the select clause. > 2. Alter the table - add a column > 3. execute the prepared statement > Expected result - get all the columns including the new column > Actual result - get the columns except the new column > Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15026957#comment-15026957 ] Tyler Hobbs commented on CASSANDRA-7910: Hmm, that's a good point. Perhaps we should include a hash of the result set metadata (in some way) in the prepared statement ID? > wildcard prepared statements are incorrect after a column is added to the > table > --- > > Key: CASSANDRA-7910 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 > Project: Cassandra > Issue Type: Bug >Reporter: Oded Peer >Assignee: Tyler Hobbs >Priority: Minor > Labels: client-impacting > Fix For: 2.1.3 > > Attachments: 7910-2.1.txt, 7910-trunk.txt, > PreparedStatementAfterAddColumnTest.java > > > 1. Prepare a statement with a wildcard in the select clause. > 2. Alter the table - add a column > 3. execute the prepared statement > Expected result - get all the columns including the new column > Actual result - get the columns except the new column > Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15026795#comment-15026795 ] Olivier Michallat commented on CASSANDRA-7910: -- There's still an issue if multiple clients are connected to the same host. The first client to execute the query after the cache was invalidated will receive an UNPREPARED response, re-prepare, and update its local metadata. But other clients might miss it entirely (the MD5 hasn't changed), and they will keep using their old metadata. > wildcard prepared statements are incorrect after a column is added to the > table > --- > > Key: CASSANDRA-7910 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 > Project: Cassandra > Issue Type: Bug >Reporter: Oded Peer >Assignee: Tyler Hobbs >Priority: Minor > Labels: client-impacting > Fix For: 2.1.3 > > Attachments: 7910-2.1.txt, 7910-trunk.txt, > PreparedStatementAfterAddColumnTest.java > > > 1. Prepare a statement with a wildcard in the select clause. > 2. Alter the table - add a column > 3. execute the prepared statement > Expected result - get all the columns including the new column > Actual result - get the columns except the new column > Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14715196#comment-14715196 ] Nate McCall commented on CASSANDRA-7910: Pretty sure this issue in conjunction with the changes introduced in CASSANDRA-9532 is triggering the following error after an {{2.0.13}} to {{2.0.16}} upgrade on one node of a six node cluster: {noformat} ERROR [Native-Transport-Requests:11] 2015-07-29 18:00:50,344 Message.java (line 403) Unexpected exception during request; channel = [id: 0x599799a6, /[redacted]:38306 = /[redacted]:9042] java.lang.AssertionError at org.apache.cassandra.cql3.ResultSet.addRow(ResultSet.java:63) at org.apache.cassandra.cql3.statements.Selection$ResultSetBuilder.build(Selection.java:330) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:1189) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:309) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:281) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:241) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:68) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:158) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:175) at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:119) at org.apache.cassandra.transport.Message$Dispatcher.messageReceived(Message.java:321) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {noformat} Note that we passed the statement parsing phase and made it all the way down into an assertion error on the number of returned columns vs. what metadata feels should be there. The rest of the cluster was moved up {{2.0.15}} (after some bisecting brought up the scope of CASSANDRA-9532) and has been running w/o issue. The one node is still running at {{2.0.16}} with transports off so we can gather some debugging information with a custom build we just put up (for which we'll enable binary for a bit to capture samples). Given the impedance mismatch between these two issues and versions, I'm putting this up here for posterity more than looking for a re-open. I'll update if we nail down a specific case that can easily produce the error and provide a work-around (most likely not using {{SELECT *...}} as previously mentioned). If we can destill something into a patch, we'll create a new issue and put it there. wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Labels: client-impacting Fix For: 2.1.3 Attachments: 7910-2.1.txt, 7910-trunk.txt, PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14706845#comment-14706845 ] Kay Johansen commented on CASSANDRA-7910: - Makes sense, thank you wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Labels: client-impacting Fix For: 2.1.3 Attachments: 7910-2.1.txt, 7910-trunk.txt, PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14706404#comment-14706404 ] Sylvain Lebresne commented on CASSANDRA-7910: - bq. What is the workaround? Don't use a wildcard, list the columns your care about in the statement. I think it's good practice anyway. wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Labels: client-impacting Fix For: 2.1.3 Attachments: 7910-2.1.txt, 7910-trunk.txt, PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14705694#comment-14705694 ] Kay Johansen commented on CASSANDRA-7910: - What is the workaround? wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Labels: client-impacting Fix For: 2.1.3 Attachments: 7910-2.1.txt, 7910-trunk.txt, PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14506627#comment-14506627 ] Sylvain Lebresne commented on CASSANDRA-7910: - No, it's not fixed on the 2.0 branch. We decided it was easy enough to workaround to not take any risk there. wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Labels: client-impacting Fix For: 2.1.3 Attachments: 7910-2.1.txt, 7910-trunk.txt, PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14505485#comment-14505485 ] Itay Adler commented on CASSANDRA-7910: --- Is this also fixed for 2.0.14? wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Labels: client-impacting Fix For: 2.1.3 Attachments: 7910-2.1.txt, 7910-trunk.txt, PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14262560#comment-14262560 ] Aleksey Yeschenko commented on CASSANDRA-7910: -- LGTM, +1 wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Fix For: 2.1.3 Attachments: 7910-2.1.txt, 7910-trunk.txt, PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14131265#comment-14131265 ] Brandon Williams commented on CASSANDRA-7910: - Version, please wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Attachments: PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14131617#comment-14131617 ] Yuki Morishita commented on CASSANDRA-7910: --- I think this relates to CASSANDRA-7566. Maybe the best thing to do is to just drop prepared when there is any schema change. wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Attachments: PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14131734#comment-14131734 ] Aleksey Yeschenko commented on CASSANDRA-7910: -- Cannot just sneakily change the number of columns returned, because of Skip_metadata flag in native proto v3, for one. Agree with Yuki here. This would be the right thing to do (maybe not on *any* table change - we don't care about options stuff being changed). wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Attachments: PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table
[ https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14131740#comment-14131740 ] Aleksey Yeschenko commented on CASSANDRA-7910: -- And not because of this issue in particular - I don't think that this, here, itself is a big deal. I'd say it's the expected behavior. But when you drop a column, for example, we should drop the statements from the cache, or else. wildcard prepared statements are incorrect after a column is added to the table --- Key: CASSANDRA-7910 URL: https://issues.apache.org/jira/browse/CASSANDRA-7910 Project: Cassandra Issue Type: Bug Components: Core Reporter: Oded Peer Assignee: Tyler Hobbs Priority: Minor Attachments: PreparedStatementAfterAddColumnTest.java 1. Prepare a statement with a wildcard in the select clause. 2. Alter the table - add a column 3. execute the prepared statement Expected result - get all the columns including the new column Actual result - get the columns except the new column Attached a test using cassandra-unit -- This message was sent by Atlassian JIRA (v6.3.4#6332)