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

analyzer/block: Preemptively terminate batch before timeout #605

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

mitjat
Copy link
Contributor

@mitjat mitjat commented Jan 19, 2024

In slow sync, blocks arrive slowly, so the analyzer is almost always in the middle of processing a batch of blocks when the batchContext (5 minutes) times out. Every so often, the analyzer is also right in the middle of analyzing a block or writing it to the DB. When that happens, the block fails. This is harmless as the block is then retried, but looks ugly/alarming in the logs.

This PR makes the analyzer end the batch when the batchContext is merely close to expiring.

@mitjat mitjat force-pushed the mitjat/preemptive-batch-terminate branch from 55b6b49 to be89e3d Compare January 19, 2024 19:53
@mitjat mitjat enabled auto-merge January 19, 2024 19:54
@mitjat mitjat merged commit b3fb398 into main Jan 19, 2024
6 checks passed
@mitjat mitjat deleted the mitjat/preemptive-batch-terminate branch January 19, 2024 19:57
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.

3 participants