Description
CASSANDRA-1608 attempts to restrict itself to one compaction task per CF (see discussion there for why this is necessary) by synchronizing LCS.getBackgroundTasks but this is not sufficient. Consider this sequence of events:
1. getBackgroundTasks returns a Task for compacting some L0 sstables. this Task is scheduled.
2. Another SSTable for this CF is flushed, so CompactionManager.submitBackground is called. getBT is not currently in-progress so the synchronization does not stop another Task from being returned and scheduled.