Buggy code:
public class ColumnFamilyStore implements ColumnFamilyStoreMBean { private static Logger logger = LoggerFactory . getLogger ( ColumnFamilyStore . class ) ; private static final ExecutorService flushSorter = new JMXEnabledThreadPoolExecutor ( Runtime . getRuntime ( ) . availableProcessors ( ) , StageManager . KEEPALIVE , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( Runtime . getRuntime ( ) . availableProcessors ( ) ) , new NamedThreadFactory ( "FlushSorter" ) , "internal" ) ; private static final ExecutorService flushWriter = new JMXEnabledThreadPoolExecutor ( DatabaseDescriptor . getFlushWriters ( ) , StageManager . KEEPALIVE , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( DatabaseDescriptor . getFlushQueueSize ( ) ) , new NamedThreadFactory ( "FlushWriter" ) , "internal" ) ; public static final ExecutorService postFlushExecutor = new JMXEnabledThreadPoolExecutor ( "MemtablePostFlusher" ) ; private Set < Memtable > memtablesPendingFlush = new ConcurrentSkipListSet < Memtable > ( ) ; public final Table table ; public final String columnFamily ; public final IPartitioner partitioner ; private final String mbeanName ; private boolean invalid = false ; private volatile int memtableSwitchCount = 0 ; private AtomicInteger fileIndexGenerator = new AtomicInteger ( 0 ) ; private volatile Memtable memtable ; private final ConcurrentSkipListMap < ByteBuffer , ColumnFamilyStore > indexedColumns ; private AtomicReference < BinaryMemtable > binaryMemtable ; private SSTableTracker ssTables ; private LatencyTracker readStats = new LatencyTracker ( ) ; private LatencyTracker writeStats = new LatencyTracker ( ) ; private final EstimatedHistogram recentSSTablesPerRead = new EstimatedHistogram ( 35 ) ; private final EstimatedHistogram sstablesPerRead = new EstimatedHistogram ( 35 ) ; public final CFMetaData metadata ; private static final int INTERN_CUTOFF = 256 ; public final ConcurrentMap < ByteBuffer , ByteBuffer > internedNames = new org . cliffc . high_scale_lib . NonBlockingHashMap < ByteBuffer , ByteBuffer > ( ) ; private volatile DefaultInteger minCompactionThreshold ; private volatile DefaultInteger maxCompactionThreshold ; private volatile DefaultInteger memtime ; private volatile DefaultInteger memsize ; private volatile DefaultDouble memops ; private volatile DefaultInteger rowCacheSaveInSeconds ; private volatile DefaultInteger keyCacheSaveInSeconds ; public static enum CacheType { KEY_CACHE_TYPE ( "KeyCache" ) , ROW_CACHE_TYPE ( "RowCache" ) ; public final String name ; private CacheType ( String name ) { } @ Override public String toString ( ) { } } public final AutoSavingCache < Pair < Descriptor , DecoratedKey > , Long > keyCache ; public final AutoSavingCache < DecoratedKey , ColumnFamily > rowCache ; public void reload ( ) { } void removeIndex ( ByteBuffer indexedColumn ) { ColumnFamilyStore indexCfs = indexedColumns . remove ( indexedColumn ) ; if ( indexCfs == null ) { ColumnFamilyStore . logger . debug ( "index<seq2seq4repair_space>{}<seq2seq4repair_space>already<seq2seq4repair_space>removed;<seq2seq4repair_space>ignoring" , ByteBufferUtil . bytesToHex ( indexedColumn ) ) ; return ; } indexCfs . unregisterMBean ( ) ; <START_BUG> SystemTable . setIndexRemoved ( metadata . tableName , indexCfs . columnFamily ) ; <END_BUG> indexCfs . removeAllSSTables ( ) ; } private ColumnFamilyStore ( Table table , String columnFamilyName , IPartitioner partitioner , int generation , CFMetaData metadata ) { } public boolean reverseReadWriteOrder ( ) { } public Future < ? > addIndex ( final ColumnDefinition info ) { } public void buildSecondaryIndexes ( Collection < SSTableReader > sstables , SortedSet < ByteBuffer > columns ) { } void unregisterMBean ( ) { } public long getMinRowSize ( ) { } public long getMaxRowSize ( ) { } public long getMeanRowSize ( ) { } public int getMeanColumns ( ) { } public static ColumnFamilyStore createColumnFamilyStore ( Table table , String columnFamily ) { } public static synchronized ColumnFamilyStore createColumnFamilyStore ( Table table , String columnFamily , IPartitioner partitioner , CFMetaData metadata ) { } public static void scrubDataDirectories ( String table , String columnFamily ) { } public void initCaches ( ) { } public void scheduleCacheSaving ( int rowCacheSavePeriodInSeconds , int keyCacheSavePeriodInSeconds ) { } private static Map < Descriptor , Set < Component > > files ( String keyspace , final String columnFamily , final boolean includeCompacted ) { } public String getColumnFamilyName ( ) { } public String getFlushPath ( ) { } public String getTempSSTablePath ( String directory ) { } Future < ? > maybeSwitchMemtable ( Memtable oldMemtable , final boolean writeCommitLog ) { } void switchBinaryMemtable ( DecoratedKey key , ByteBuffer buffer ) { } public void forceFlushIfExpired ( ) { } public Future < ? > forceFlush ( ) { } public void forceBlockingFlush ( ) throws InterruptedException , ExecutionException { } public void forceFlushBinary ( ) { } Memtable apply ( DecoratedKey key , ColumnFamily columnFamily ) { } void applyBinary ( DecoratedKey key , ByteBuffer buffer ) { } public static ColumnFamily removeDeletedCF ( ColumnFamily cf , int gcBefore ) { } public static ColumnFamily removeDeleted ( ColumnFamily cf , int gcBefore ) { } private static void removeDeletedColumnsOnly ( ColumnFamily cf , int gcBefore ) { } private static void removeDeletedStandard ( ColumnFamily cf , int gcBefore ) { } private static void removeDeletedSuper ( ColumnFamily cf , int gcBefore ) { } public boolean isKeyInRemainingSSTables ( DecoratedKey key , Set < SSTable > sstablesToIgnore ) { } public void addSSTable ( SSTableReader sstable ) { } long getExpectedCompactedFileSize ( Iterable < SSTableReader > sstables ) { } SSTableReader getMaxSizeFile ( Iterable < SSTableReader > sstables ) { } public void forceCleanup ( NodeId . OneShotRenewer renewer ) throws InterruptedException , ExecutionException { } public void scrub ( ) throws InterruptedException , ExecutionException { } void markCompacted ( Collection < SSTableReader > sstables ) { } boolean isCompleteSSTables ( Collection < SSTableReader > sstables ) { } void replaceCompactedSSTables ( Collection < SSTableReader > sstables , Iterable < SSTableReader > replacements ) { } public boolean isInvalid ( ) { } public void removeAllSSTables ( ) { } void submitFlush ( IFlushable flushable , CountDownLatch latch ) { } public long getMemtableColumnsCount ( ) { } public long getMemtableDataSize ( ) { } public int getMemtableSwitchCount ( ) { } private Memtable getMemtableThreadSafe ( ) { } public Collection < SSTableReader > getSSTables ( ) { }

Fix:
SystemTable . setIndexRemoved ( metadata . ksName , indexCfs . columnFamily ) ;