[ https://issues.apache.org/jira/browse/CASSANDRA-7392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14612937#comment-14612937 ]
Stefania commented on CASSANDRA-7392: ------------------------------------- [~slebresne], I would like to know how to best abort a read operation. I think we have several options: - Add an "abort requested" control field (OpState) in the code [here|https://github.com/stef1927/cassandra/commits/7392] to ReadCommand but this means changing the constructor chain which is very complex (the index read command needs to inherit the control field of the main command - unless we make it not final) - Pass it as an argument to the various methods (executeLocally, queryStorage, search, etc) - Add it to ReadOrderGroup, which is passed almost everywhere but it isn't really related - Simply stop the iterator in executeLocally with a wrapper iterator (this is required anyway I believe but it would not abort the index reads) Could you comment on : - your preferred option, I don't want to spoil your design :) - whether the code is stable or whether there is some refactoring still missing that I should wait for or help out with > Abort in-progress queries that time out > --------------------------------------- > > Key: CASSANDRA-7392 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7392 > Project: Cassandra > Issue Type: New Feature > Components: Core > Reporter: Jonathan Ellis > Assignee: Stefania > Fix For: 3.x > > > Currently we drop queries that time out before we get to them (because node > is overloaded) but not queries that time out while being processed. > (Particularly common for index queries on data that shouldn't be indexed.) > Adding the latter and logging when we have to interrupt one gets us a poor > man's "slow query log" for free. -- This message was sent by Atlassian JIRA (v6.3.4#6332)