mike-tr-adamson commented on code in PR #2769:
URL: https://github.com/apache/cassandra/pull/2769#discussion_r1362440840
##########
src/java/org/apache/cassandra/index/sai/StorageAttachedIndexGroup.java:
##########
@@ -128,14 +130,13 @@ public void removeIndex(Index index)
for (SSTableReader sstable : contextManager.sstables())
sstable.unregisterComponents(IndexDescriptor.create(sstable).getLivePerSSTableComponents(),
baseCfs.getTracker());
deletePerSSTableFiles(baseCfs.getLiveSSTables());
- baseCfs.getTracker().unsubscribe(this);
}
}
@Override
public void invalidate()
{
- // in case of dropping table, sstable contexts should already been
removed by SSTableListChangedNotification.
+ // in case of removing last index from group, sstable contexts should
already been removed by removeIndex
Review Comment:
Hmm, there are a few comments floating around that I don't think are
strictly correct. When you say "per-column index files are removed", do you
mean when they are deleted?
Apart from index rebuilds and index corruption, the only time per-column
index files are deleted is when their associated `SSTableIndex` is released and
has been marked as obsolete. This happens when the `IndexViewManager`
associated with an index (via the `IndexContext`) is invalidated. This happens
as part of the index invalidate task which is called from `Keyspace.unloadCf`
during drop table.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]