cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Tunnicliffe (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-13363) Fix racy read command serialization
Date Tue, 29 Aug 2017 15:13:00 GMT


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

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:
>             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-/,5,main]
> {code}
> {code}
> java.lang.ArrayIndexOutOfBoundsException: null
> {code}
> Logger: org.apache.cassandra.service.CassandraDaemon
> Thrdead: MessagingService-Incoming-/
> Method: uncaughtException
> File:
> Line: 229

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message