Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix-o committed Jun 21, 2024
1 parent bbfaafc commit 943e55d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/sui-data-ingestion-core/src/progress_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ impl<P: ProgressStore> ProgressStore for ProgressStoreWrapper<P> {
task_name: String,
checkpoint_number: CheckpointSequenceNumber,
) -> Result<()> {
self.progress_store
.save(task_name.clone(), checkpoint_number)
.await?;
self.pending_state.insert(task_name, checkpoint_number);
if checkpoint_number > self.load(task_name.clone()).await? {
self.progress_store
.save(task_name.clone(), checkpoint_number)
.await?;
self.pending_state.insert(task_name, checkpoint_number);
}
Ok(())
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/sui-data-ingestion-core/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ impl CheckpointReader {
watcher
.watch(&self.path, RecursiveMode::NonRecursive)
.expect("Inotify watcher failed");
self.gc_processed_files(self.last_pruned_watermark).expect("Failed to clean the directory");

loop {
tokio::select! {
Expand Down

0 comments on commit 943e55d

Please sign in to comment.