You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Blake Eggleston (JIRA)" <ji...@apache.org> on 2015/09/12 01:05:46 UTC
[jira] [Commented] (CASSANDRA-10266) Introduce direct unit test
coverage for Rows
[ https://issues.apache.org/jira/browse/CASSANDRA-10266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14741690#comment-14741690 ]
Blake Eggleston commented on CASSANDRA-10266:
---------------------------------------------
The linked branch adds unit tests for {{Rows}}, as well as a test for {{Cells.reconcileComplex}}, which wasn't tested previously.
I found a bug in {{Rows.diff}} where complex deletion info would be discarded if both rows had column data for the same collection column. This created a DataResolver bug for collection columns that could cause multiple overwrites to merge together after a read repair
For instance, on a 3 node cluster, with the table {{CREATE TABLE numbers (k INT PRIMARY KEY, m MAP<INT, INT>);}}, and updates:
{code}
UPDATE numbers SET m={0:0} WHERE k=0; // is received by all nodes
UPDATE numbers SET m={1:1} WHERE k=0; // is only received by node A
{code}
a quorum read including node A would initially return {{1:1}} for m. However, a read repair would only send the cell for {{1:1}}, not the complex delete, so subsequent reads not including node A would return {{0:0, 1:1}}.
I've fixed the bug [here|https://github.com/bdeggleston/cassandra/blob/10266R/src/java/org/apache/cassandra/db/rows/Rows.java#L185], and added a few DataResolver tests that test collection columns.
> Introduce direct unit test coverage for Rows
> --------------------------------------------
>
> Key: CASSANDRA-10266
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10266
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Benedict
> Assignee: Blake Eggleston
> Fix For: 3.0.0 rc1
>
>
> As with much of the codebase, we have no direct unit test coverage for {{Rows}}, and we should remedy this given how central it is to behaviour.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)