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

Internally check if the block processor needs to drop blocks. #4161

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

clemahieu
Copy link
Contributor

Internally check if the block processor needs to drop blocks, rather than making it a requirement of the caller.

Adds a stat counter when the block_processor drops a block as this is new behavior.

@clemahieu clemahieu added the documentation This item indicates the need for or supplies updated or expanded documentation label Feb 27, 2023
@clemahieu clemahieu added this to the V25.0 milestone Feb 27, 2023
Copy link
Contributor

@thsfs thsfs left a comment

Choose a reason for hiding this comment

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

Noticed that the add_local function doesn't check for full (). Isn't it necessary there?

…than making it a requirement of the caller.

Adds a stat counter when the block_processor drops a block as this is new behavior.
@pwojcikdev
Copy link
Contributor

pwojcikdev commented Feb 28, 2023

I'm not 100% sure about limiting the add_local, if the source of those blocks is RPC then overriding user action without any feedback might be unexpected.

@thsfs
Copy link
Contributor

thsfs commented Feb 28, 2023

I'm not 100% sure about limiting the add_local, if the source of those blocks is RPC then overriding user action without any feedback might be unexpected.

Agree on adding a feedback to the RPC for block processor is full.

@clemahieu
Copy link
Contributor Author

Looking through call sites, the add_local is only called by process_local_async, when the "process" RPC is called with "async".

In our documentation we already mention observing when a block is inserted actually, via the websocket stream. Either we can document here or somewhere else that the block processing queue can internally drop and the stat to check for.
https://docs.nano.org/commands/rpc-protocol/#process

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation This item indicates the need for or supplies updated or expanded documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants