Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions core/src/amp_subgraph/runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@ where
}
}

// Check if the Amp Flight server has data covering through every data
// source's endBlock. This handles the case where endBlock has no entity
// data — the persisted block pointer never advances to endBlock, but the
// server's latest block confirms all queries have been served.
if latest_block >= cx.max_end_block() {
cx.metrics.deployment_synced.record(true);

debug!(cx.logger, "Indexing completed; endBlock reached via server latest block";
"latest_block" => latest_block,
"max_end_block" => cx.max_end_block()
);
return Ok(());
}

debug!(cx.logger, "Completed indexing iteration";
"latest_synced_block_ptr" => ?cx.latest_synced_block_ptr()
);
Expand Down