Skip to content

Commit

Permalink
[data ingestion] handle termination in worker pool (#19192)
Browse files Browse the repository at this point in the history
## 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:
- [ ] REST API:
  • Loading branch information
phoenix-o authored and suiwombat committed Sep 16, 2024
1 parent aff84fe commit 7f780b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/sui-data-ingestion-core/src/worker_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ impl<W: Worker + 'static> WorkerPool<W> {
}
}
}
Some(checkpoint) = checkpoint_receiver.recv() => {
maybe_checkpoint = checkpoint_receiver.recv() => {
if maybe_checkpoint.is_none() {
break;
}
let checkpoint = maybe_checkpoint.expect("invariant's checked");
let sequence_number = checkpoint.checkpoint_summary.sequence_number;
if sequence_number < current_checkpoint_number {
continue;
Expand Down

0 comments on commit 7f780b8

Please sign in to comment.