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

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

{quote} Does it take a lot of time to do "the lookup to determine which index 
to use "?

1=>send the command to other replica, must after the local replica figure out 
which index to use .
2=>send to all replica, all replica figure it out itself.

which looks better?
{quote}

Through profiling, we found that a non-trivial amount of time was spent in 
{{SecondaryIndexManager::getBestIndexFor}}. Part of the problem was that once 
found, there was no index field on the command to set, so originally this 
lookup was being done 3 or 4 times per-query, on every replica. 
Once that was fixed, it made sense to just do the index lookup once when the 
command is constructed, so it could be included in the serialization & so save 
the replicas from having to do the lookup. So the lookup goes from being 
performed (4 x num_replicas) times to once per query, which seems like a good 
idea generally. 



> java.lang.ArrayIndexOutOfBoundsException: null
> ----------------------------------------------
>
>                 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: zhaoyan
>            Priority: Critical
>             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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to