use crate::common::counter::hardware_counter::HardwareCounterCell;
use crate::common::sorted_slice::SortedSlice;
use crate::common::types::PointOffsetType;
use super::VectorIndexReadEnum;
use crate::segment::common::live_reload::LiveReload;
use crate::segment::common::operation_error::OperationResult;
use crate::segment::index::UniversalReadExt;
impl<S: UniversalReadExt> LiveReload for VectorIndexReadEnum<S> {
type Fs = S::Fs;
fn live_reload(
&mut self,
_fs: &S::Fs,
_deleted_points: &SortedSlice<'_, PointOffsetType>,
new_points: &SortedSlice<'_, PointOffsetType>,
_hw_counter: &HardwareCounterCell,
) -> OperationResult<()> {
match self {
Self::SparseMutableRam(index) => index.live_reload(new_points),
Self::Plain(_)
| Self::Hnsw(_)
| Self::SparseCompressedImmutableRamF32(_)
| Self::SparseCompressedImmutableRamF16(_)
| Self::SparseCompressedImmutableRamU8(_)
| Self::SparseCompressedStoredF32(_)
| Self::SparseCompressedStoredF16(_)
| Self::SparseCompressedStoredU8(_) => Ok(()),
}
}
}