Skip to content
New issue

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

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

Already on GitHub? # to your account

Limit batch size for block processor #4655

Merged

Conversation

pwojcikdev
Copy link
Contributor

This limits a single block processor batch size to 256 blocks. This makes batch sizes uniform across all components. Additionally, if disk is slow and database transaction is held longer than 500ms, the transaction is refreshed during batch processing.

@pwojcikdev pwojcikdev changed the title Limited batch sizes for block processor Limit batch size for block processor Jun 23, 2024
Copy link
Contributor

@clemahieu clemahieu left a comment

Choose a reason for hiding this comment

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

Minor question about getting batches from the fair_queue though otherwise LGTM. This was a badly needed cleanup.


lock_a.lock ();
std::deque<context> results;
while (!queue.empty () && results.size () < max_count)
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't fair_queue already have a next_batch()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has, but there were some additional checks in the block_processor::next () so it wasn't a drop in replacement.

@pwojcikdev pwojcikdev merged commit 339c819 into nanocurrency:develop Jul 3, 2024
25 of 28 checks passed
@qwahzi qwahzi added this to the V27 milestone Jul 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants