Benedict created CASSANDRA-9593:
-----------------------------------

             Summary: Compaction may stall due to race condition
                 Key: CASSANDRA-9593
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9593
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Benedict
            Priority: Minor
             Fix For: 2.2.x


If the maximum number of compactions are running, and they all terminate 
simultaneously, they can fail to submit any further compaction tasks. Further, 
since each only submits one on completion, we only need two of these to race 
with each other to reduce the number of active compactions below the configured 
concurrency level.

There are a couple of ways to get around this. This simplest is to submit a 
task to another thread pool to perform the submitBackgroundTask(), but this may 
be unnecessarily delayed. Another is to maintain a separate count of active 
compaction tasks, that is decremented while the thread is still serving the 
request. A partial solution is to just discount the calling thread from the 
count of active tasks, so at least one of any competitors will win.

The problem is mitigated considerably by CASSANDRA-9592, so there's no urgency 
to this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to