[ 
https://issues.apache.org/jira/browse/CASSANDRA-12090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-12090:
-----------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.9
                   3.0.9
    Reproduced In: 3.7, 3.0.7  (was: 3.0.7, 3.7)
           Status: Resolved  (was: Patch Available)

You're right, when serializing we ignore the column names if there is no static 
row so we get a different result pre and post deserialization, and fixing the 
digest is the most sensible approach.

I'll note that in fact, it was misguided to include the column names in the 
digest in the first place, and I added a comment to that regard, but we'll have 
to wait on 4.0 and a new protocol version for that.

Anyway, pushed CI on the patch and it looked "clean" (the failures were either 
also on the non-patched branches, or were fairly clearly unrelated and not 
reproducing locally):
| [12090-3.0|https://github.com/pcmanus/cassandra/commits/12090-3.0] | 
[utests|http://cassci.datastax.com/job/pcmanus-12090-3.0-testall] | 
[dtests|http://cassci.datastax.com/job/pcmanus-12090-3.0-dtest] |

So committed, thanks.

> Digest mismatch if static column is NULL
> ----------------------------------------
>
>                 Key: CASSANDRA-12090
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12090
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Tommy Stendahl
>            Assignee: Tommy Stendahl
>             Fix For: 3.0.9, 3.9
>
>         Attachments: 12090.txt, trace.txt
>
>
> If a table has a static column and this column has a null value for a 
> partition a SELECT on this partition will always trigger a digest mismatch, 
> but the following full data read will not trigger a read repair since there 
> is  no mismatch in the data.
> This can be recreated using a 3 node ccm cluster with the following commands:
> {code:sql}
> CREATE KEYSPACE foo WITH replication = {'class': 'NetworkTopologyStrategy', 
> 'dc1': '3' };
> CREATE TABLE foo.foo ( key int, foo int, col int static, PRIMARY KEY (key, 
> foo) );
> CONSISTENCY QUORUM;
> INSERT INTO foo.foo (key, foo) VALUES ( 1,1);
> TRACING ON;
> SELECT * FROM foo.foo WHERE key = 1 and foo =1;
> {code}
> I have added the trace in an attachment. In the trace you can see that digest 
> read is performed and that there is a digest mismatch, but the full data read 
> does not result in a mismatch. Repeating the SELECT statement will give the 
> same trace over and over.
> The problem seams to be that the name of the static column is included when 
> the digest response is calculated even if the column has no value. When the 
> digest for the data response is calculated the column name is not included.
> I think the can be solved by updating {{UnfilteredRowIterators.digest()}} so 
> excludes the static column if it has no value. I have a patch that does this, 
> it merges to both 3.0 and trunk. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to