Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not poll more than the configured amount when filling gaps #123

Conversation

iuwqyir
Copy link
Collaborator

@iuwqyir iuwqyir commented Dec 4, 2024

TL;DR

Added a limit to the number of blocks that can be polled when handling gaps in block sequences.

What changed?

  • Added a check to limit the number of missing blocks to poll based on the poller's blocksPerPoll configuration
  • Reordered logging statements for better clarity
  • Added debug logging to indicate when block polling is limited due to configuration

How to test?

  1. Configure a low blocksPerPoll value
  2. Create a scenario with a large gap between expected and actual block numbers
  3. Verify that the number of polled blocks is capped at the configured blocksPerPoll value
  4. Check debug logs to confirm the limitation message appears

Why make this change?

To prevent potential performance issues and resource exhaustion when handling large gaps in block sequences. This change ensures the system maintains stability by limiting the number of blocks that can be polled in a single operation.

Copy link
Collaborator Author

iuwqyir commented Dec 4, 2024

@iuwqyir iuwqyir requested a review from AmineAfia December 4, 2024 22:39
@iuwqyir iuwqyir marked this pull request as ready for review December 4, 2024 22:39
This was referenced Dec 5, 2024
Copy link
Collaborator Author

iuwqyir commented Dec 6, 2024

Merge activity

  • Dec 6, 2:56 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 6, 2:56 PM EST: A user merged this pull request with Graphite.

@iuwqyir iuwqyir merged commit cdb050b into main Dec 6, 2024
5 checks passed
@iuwqyir iuwqyir deleted the 12-05-do_not_poll_more_than_the_configured_amount_when_filling_gaps branch December 6, 2024 19:56
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