Skip to content

Fix LogPoller reprocessing entire block range on partial failure#1465

Draft
Krish-vemula wants to merge 3 commits intodevelopfrom
cre/PLEX-2521
Draft

Fix LogPoller reprocessing entire block range on partial failure#1465
Krish-vemula wants to merge 3 commits intodevelopfrom
cre/PLEX-2521

Conversation

@Krish-vemula
Copy link

Description

Fixes excessive getBlock RPC calls caused by the LogPoller reprocessing already-succeeded blocks when a failure occurs partway through a block range. Previously, lastProcessedSlot was only updated after the entire range completed successfully any error (DB timeout, decoding failure, rate limiting) would cause the next tick to re-fetch and re-process every block from the start of the range. Now lastProcessedSlot advances incrementally after each successfully processed batch, so retries resume from where processing left off.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

✅ API Diff Results - No breaking changes


📄 View full apidiff report

return fmt.Errorf("failed processing block range [%d, %d]: %w", lastProcessedSlot+1, highestSlot, err)
}

lp.lastProcessedSlot = highestSlot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new lastProcessedSlot update logic, should we remove this from here?

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 75%)

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants