Skip to content

Commit

Permalink
added implementation comment regarding auto-indexing
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
jqnatividad committed Sep 15, 2023
1 parent 267b924 commit 051dc23
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,13 @@ impl Config {
let mut data_modified = 0_u64;
let data_fsize;
let mut idx_path_work = PathBuf::new();

// the auto_indexed flag is set when an index is created automatically with
// autoindex_file(). We use this flag to avoid checking if the index exists every
// time this function is called. If the index was already auto-indexed, we can just
// use it & return immediately.
let auto_indexed = AUTO_INDEXED.load(Ordering::Relaxed);

let (csv_file, mut idx_file) = if auto_indexed {
(
fs::File::open(self.path.clone().unwrap())?,
Expand Down

0 comments on commit 051dc23

Please sign in to comment.