Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
All fetchers that implements the
BufferedTask
behaviour has init query that fetches all records from db that have to be handled by current fetcher. These queries may be complicated and therefore time consuming.Changelog
Added limit for fetchers init queries. Logic of BufferedTask was changed a bit. Now all fetchers have
poll: true
by default which means that they will run init function again every time their queue is empty. So every init task now have the limit and remaining entries will be fetched with the same limit when fetcher is done.Introduced
INDEXER_FETCHER_INIT_QUERY_LIMIT
env var, docs update: blockscout/docs#165