You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sam Tunnicliffe (JIRA)" <ji...@apache.org> on 2017/08/29 15:13:00 UTC

[jira] [Commented] (CASSANDRA-13363) Fix racy read command serialization

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

Sam Tunnicliffe commented on CASSANDRA-13363:
---------------------------------------------

LGTM except now that {{findIndex}} is baked into {{SinglePartitionReadCommand}}, we perform a lookup through {{SIM::getBestIndexFor}} when creating the commands to actually read from index tables in {{CompositesSearcher}} & {{KeysSearcher}}. Also, because those commands are created using the base table's CFM, we actually end up finding an index (the one we're in the process of searching). In practice, I don't suppose this is much of a problem as the execution of those commands is done directly through {{queryMemtableAndDisk}}, so we don't attempt to erroneously use the index. However, it is confusing and more seriously, it breaks {{secondary_index_test:TestSecondaryIndexes.test_only_coordinator_chooses_index_for_query}}.

Aside from that, I just have a couple of tiny nits, feel free to ignore either/both:

{{getBestIndexFor(ReadCommand)}} is now only used by tests which could easily be tweaked to use the version which takes a {{RowFilter}}. OFC, that trivial method doesn't really muck up the the {{SIM}} API, so nbd if it stays, but it isn't really adding anything either so ¯\_(ツ)_/¯

In some methods of {{*ReadCommand}}, the long lists of args are formatted 1 per line, and in others are in a single line. e.g. {{SPRC::create}} vs {{SPRC::copy}} etc. All of these are already touched by this patch, so they may as well be consistently formatted.


> Fix racy read command serialization
> -----------------------------------
>
>                 Key: CASSANDRA-13363
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13363
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: CentOS 6, Cassandra 3.10
>            Reporter: Artem Rokhin
>            Assignee: Aleksey Yeschenko
>             Fix For: 3.0.x, 3.11.x, 4.x
>
>
> Constantly see this error in the log without any additional information or a stack trace.
> {code}
> Exception in thread Thread[MessagingService-Incoming-/10.0.1.26,5,main]
> {code}
> {code}
> java.lang.ArrayIndexOutOfBoundsException: null
> {code}
> Logger: org.apache.cassandra.service.CassandraDaemon
> Thrdead: MessagingService-Incoming-/10.0.1.12
> Method: uncaughtException
> File: CassandraDaemon.java
> Line: 229



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org