Skip to content

Commit

Permalink
indexer ingestion: logs for local files (MystenLabs#18577)
Browse files Browse the repository at this point in the history
## Description 

Chris set up a colocated FN <> indexer, adding some logs to
differentiate the read source.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
gegaowp authored Jul 9, 2024
1 parent c8e274c commit eea7e78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/sui-data-ingestion-core/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,19 +220,22 @@ impl CheckpointReader {
})
.await?;

let mut read_source: &str = "local";
if self.remote_store_url.is_some()
&& (checkpoints.is_empty()
|| checkpoints[0].checkpoint_summary.sequence_number
> self.current_checkpoint_number)
{
checkpoints = self.remote_fetch();
read_source = "remote";
} else {
// cancel remote fetcher execution because local reader has made progress
self.remote_fetcher_receiver = None;
}

info!(
"Reader. Current checkpoint number: {}, pruning watermark: {}, new updates: {:?}",
"Read from {}. Current checkpoint number: {}, pruning watermark: {}, new updates: {:?}",
read_source,
self.current_checkpoint_number,
self.last_pruned_watermark,
checkpoints.len(),
Expand Down

0 comments on commit eea7e78

Please sign in to comment.