per review

Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
discord9
2025-12-04 11:10:52 +08:00
parent 12de9b4998
commit 46ab9ebe02
3 changed files with 2 additions and 5 deletions

View File

@@ -476,9 +476,10 @@ impl TempFileCleaner {
}
/// Removes the SST and index file from the local atomic dir by the file id.
/// This only remove the initial index, Since the index version is always 0 for a new SST, this method should be safe to pass 0.
pub(crate) async fn clean_by_file_id(&self, file_id: FileId) {
let sst_key = IndexKey::new(self.region_id, file_id, FileType::Parquet).to_string();
let index_key = IndexKey::new(self.region_id, file_id, FileType::Puffin(0)).to_string(); // TODO(discord9): confirm correctness
let index_key = IndexKey::new(self.region_id, file_id, FileType::Puffin(0)).to_string();
Self::clean_atomic_dir_files(&self.object_store, &[&sst_key, &index_key]).await;
}

View File

@@ -35,8 +35,6 @@ const INDEX_RESULT_TYPE: &str = "index_result";
///
/// Row groups can be partially searched. Row groups that not contained in `RowGroupSelection` are not searched.
/// User can retrieve the partial results and handle uncontained row groups required by the predicate subsequently.
///
/// FIXME(discord9): confirm if this key need version?
pub struct IndexResultCache {
cache: Cache<(PredicateKey, FileId), Arc<RowGroupSelection>>,
}

View File

@@ -172,8 +172,6 @@ pub(crate) async fn collect_index_entries_from_puffin(
Some(BlobIndexTypeTargetKey::Inverted) => {
let mut inverted_entries = collect_inverted_entries(
&reader,
// version is not needed here since rebuild index would be another type of index(and this one will invalidate)
// and building a new index also wouldn't be in the cache
region_index_id,
inverted_index_cache.as_ref(),
&context,