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

Pool channels should be created with capacity #3828

Closed
sydhds opened this issue Apr 14, 2023 · 3 comments · Fixed by #3989
Closed

Pool channels should be created with capacity #3828

sydhds opened this issue Apr 14, 2023 · 3 comments · Fixed by #3989
Assignees

Comments

@sydhds
Copy link
Contributor

sydhds commented Apr 14, 2023

So if the pool is late, items in channels are dropped instead of blocking the emitter

@AurelienFT
Copy link
Contributor

We could start with few thousands on each to be sure. The number should be specified in the config.

@Ben-PH
Copy link
Contributor

Ben-PH commented May 9, 2023

Having a look through the code base, It's difficult to see where the entry point to this task is. I'm guessing it's to do with massa_pool_exports::PoolChannels, which currently uses tokio::sync::channel::broadcast sender, and reading the documentation, it looks like capacity is already set:

// massa-node/src/main.rs
    let pool_channels = PoolChannels {
        endorsement_sender: broadcast::channel(pool_config.broadcast_endorsements_channel_capacity)
            .0,
        operation_sender: broadcast::channel(pool_config.broadcast_operations_channel_capacity).0,
        selector: selector_controller.clone(),
    };

Am I missing anything?

@AurelienFT
Copy link
Contributor

This are the channels to broadcast what's going on to be used by other modules (for now used only by grpc API for streaming). The PoolChannels and all XXXChannels structures in the code always define channels that are meant to be exposed and used by other modules.

The internal channels are created in function start_pool_controller looking at them now they already have a size but the three use the same variable. I think, to consider the task done, it would be nice to make a config variable per channel :)

@modship modship self-assigned this May 26, 2023
@modship modship mentioned this issue May 26, 2023
7 tasks
@modship modship linked a pull request May 26, 2023 that will close this issue
7 tasks
@modship modship closed this as completed May 26, 2023
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 a pull request may close this issue.

4 participants