cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <>
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


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|] attached.

> Fix dtest cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_bulk_round_trip
> -------------------------------------------------------------------------
>                 Key: CASSANDRA-10509
>                 URL:
>             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:

This message was sent by Atlassian JIRA

View raw message