cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10509) Fix dtest cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_bulk_round_trip
Date Thu, 15 Oct 2015 07:32:05 GMT

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

Stefania commented on CASSANDRA-10509:
--------------------------------------

It seems we get an extra row in the count if we cross the page boundary. For example we can
reproduce this problem about 50% of the times with as little as 1000 entries if we set the
page size to 1000 using {{self.session.default_fetch_size = 1000}}. Using the current dtest
value of 100K entries is slower but also more reliable in reproducing this problem.

{{AbstractQueryPager.fetchPage}} retrieves an extra live row the last time it is called. It
has a mechanism to exclude the first row if it is the same as the last row in the previous
page by calling {{containsPreviousLast}}, which is implemented by the sub-classes. {{RangeNamesQueryPager.containsPreviousLast}}
however always returns false because the corresponding {{queryNextPage}} uses {{ExcludingBounds}}
to set the range in the read command. Therefore, the last queried key should never be included.
However, as far as I can see {{ExcludingBounds}} is serialized as {{Bounds}}, which does include
the endpoints. So, first we query (MIN, MIN) to get the entire range, then the next page will
query (LAST_KEY,MIN), where LAST_KEY is the key of the last partition retrieved by the previous
page, but if the last key is not local we are actually querying \[LAST_KEY, MIN\] and we retrieve
the partition for LAST_KEY again.

It is not clear why it could not be reproduced with {{SELECT *}}.

Tentative [patch|https://github.com/stef1927/cassandra/tree/10509-2.2] attached.

http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-10509-2.2-dtest
http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-10509-2.2-testall

> Fix dtest cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_bulk_round_trip
> -------------------------------------------------------------------------
>
>                 Key: CASSANDRA-10509
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10509
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Paulo Motta
>            Assignee: Stefania
>             Fix For: 2.2.x
>
>
> Test failing on 2.2 after fixing CASSANDRA-10507:
> http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-10507-2.2-dtest/lastCompletedBuild/testReport/cqlsh_tests.cqlsh_copy_tests/CqlshCopyTest/test_bulk_round_trip/



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

Mime
View raw message