Skip to content

Commit 3a6abf1

Browse files
committed
more cleanup
1 parent 6e687d6 commit 3a6abf1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kernel/src/log_replay/deduplicator.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ use crate::log_replay::FileActionKey;
1818
use crate::DeltaResult;
1919

2020
pub(crate) trait Deduplicator {
21-
/// Key type for identifying file actions. JSON deduplicators use `FileActionKey`
22-
/// (path + dv_unique_id), checkpoint deduplicators may use path-only keys.
21+
/// Key type for identifying file actions.
2322
type Key;
2423

2524
/// Extracts a file action key from the data. Returns `(key, is_add)` if found.
@@ -73,6 +72,7 @@ pub(crate) struct CheckpointDeduplicator<'a> {
7372
add_path_index: usize,
7473
add_dv_start_index: usize,
7574
}
75+
7676
impl CheckpointDeduplicator<'_> {
7777
#[allow(unused)]
7878
pub(crate) fn try_new<'a>(
@@ -107,10 +107,13 @@ impl Deduplicator for CheckpointDeduplicator<'_> {
107107
}
108108

109109
fn check_and_record_seen(&mut self, key: Self::Key) -> bool {
110+
// NOTE: we do not record the key because this is an immutable map.
111+
// Checkpoints should never require an update on the seen_file_keys.
110112
self.seen_file_keys.contains(&key)
111113
}
112114

113115
fn is_log_batch(&self) -> bool {
116+
// Checkpoint deduplicator may only be constructed for checkpoint batches
114117
false
115118
}
116119
}

0 commit comments

Comments
 (0)