Class IndexViewManager

java.lang.Object
org.apache.cassandra.index.sai.view.IndexViewManager

public class IndexViewManager extends Object
Maintain an atomic view for read requests, so that requests can read all data during concurrent compactions.

All per-column SSTableIndex updates should be proxied by StorageAttachedIndexGroup to make sure per-sstable SSTableContext are in-sync.

  • Constructor Details

  • Method Details

    • view

      public View view()
    • update

      public Collection<SSTableContext> update(Collection<SSTableReader> oldSSTables, Collection<SSTableContext> newSSTableContexts, IndexValidation validation)
      Replaces old SSTables with new by creating new immutable view.
      Parameters:
      oldSSTables - A set of SSTables to remove.
      newSSTableContexts - A set of SSTableContexts to add to tracker.
      validation - Controls how indexes should be validated
      Returns:
      A set of SSTables which have attached to them invalid index components.
    • drop

      public void drop(Collection<SSTableReader> sstablesToRebuild)
    • invalidate

      public void invalidate()
      Called when index is dropped. Mark all SSTableIndex as released and per-column index files will be removed when in-flight queries are completed.