[
https://issues.apache.org/jira/browse/CASSANDRA-8502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14305906#comment-14305906
]
Tyler Hobbs commented on CASSANDRA-8502:
----------------------------------------
I've updated my
[branch|https://github.com/thobbs/cassandra/tree/CASSANDRA-8502-2.0] for your
review comments. A few responses:
bq. That does suggest the changes in DataRange are unnecessary then.
We still need the DataRange changes for non-reversed range queries.
bq. Not sure about the modifications in SliceQueryFilter.trim and
AbstractQueryPager.discardHead \[...\] the right place to fix that is imo the
column counter
I've created a ColumnCounter variant to handle reversed slices, but that only
fixes {{SliceQueryFilter.trim()}}. We still need the changes to
{{AbstractQueryPager.discardHead()}} to avoid discarding static columns,
regardless of count.
bq. I think AbstractQueryPager.firstNonStaticColumns deserves a comment as to
why we need to skip static columns
I've added one, but basically the reason is that we don't want to record a
static column as the last-seen cell in reversed paged queries. If we do, it
screws up the starting point for the next page.
bq. the detection of static slices tests for {{EMPTY_BYTE_BUFFER}} which is
fragile, so I'd personally prefer making the detection more reliable (by
comparing if a slice start before/stop after the end of the static block).
This is a different issue, but I went ahead and changed the comparison to check
against {{cfm.getStaticColumnNameBuilder()}} instead.
bq. Not convinced {{lastKeyFilterWasUpdatedFor}} is actually an optimization
\[...\] every other key (which is generally a lot) will trigger a few more
useless comparisons.
There's a simple compromise, which I made in one commit. We can just check
{{lastKeyFilterWasUpdatedFor}} after checking start/stop. I feel like this is
worthwhile, because without it, all of the slices will be recreated multiple
times for every page on a wide partition. This gets pretty expensive when you
have a lot of slices (for example, with an IN on the clustering column).
bq. let's maybe call CFMetaData.rebuild instead.
Done, thanks for the suggestion.
> Static columns returning null for pages after first
> ---------------------------------------------------
>
> Key: CASSANDRA-8502
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8502
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Flavien Charlon
> Assignee: Tyler Hobbs
> Fix For: 2.1.3, 2.0.13
>
> Attachments: 8502-2.0.txt, null-static-column.txt
>
>
> When paging is used for a query containing a static column, the first page
> contains the right value for the static column, but subsequent pages have
> null null for the static column instead of the expected value.
> Repro steps:
> - Create a table with a static column
> - Create a partition with 500 cells
> - Using cqlsh, query that partition
> Actual result:
> - You will see that first, the static column appears as expected, but if you
> press a key after "---MORE---", the static columns will appear as null.
> See the attached file for a repro of the output.
> I am using a single node cluster.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)