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

Proactively drop closed subscribers while waiting slot/block import acknowledgements in MockPrimaryNode #1357

Merged
merged 2 commits into from
Apr 7, 2023

Conversation

NingLin-P
Copy link
Member

@NingLin-P NingLin-P commented Apr 6, 2023

Fix #1352

It is possible that the slot/block import subscriber is dropped after notification then we will block on waiting for acknowledgment forever, see #1352 (comment) for more details. This commit fixes this issue by proactively drop closed subscribers while waiting for acknowledgements.

Code contributor checklist:

Copy link
Member

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

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

Make sure to note what things are necessary and what are workarounds. The code you wrote here is an annoying workaround we wouldn't write otherwise, but there was no TODO to remove it, no link for prosperity about such monstrosity is needed. We want to leave instructions for future maintainers explaining when code can be cleaned up.

test/subspace-test-service/src/mock.rs Outdated Show resolved Hide resolved
…cknowledgements in MockPrimaryNode

It is possible that the slot/block import subscriber is dropped after notification then
we will block on waiting for acknowledgement forever, see #1352 for more details. This
commit fix this issue by proactively drop closed subscribers while waiting acknowledgements.

Signed-off-by: linning <linningde25@gmail.com>
…_proof_should_not_work

Signed-off-by: linning <linningde25@gmail.com>
@NingLin-P NingLin-P changed the title Dynamically adjust the expected slot/block import acknowledgment count in MockPrimaryNode Proactively drop closed subscribers while waiting slot/block import acknowledgements in MockPrimaryNode Apr 6, 2023
@NingLin-P NingLin-P merged commit c43d1e6 into main Apr 7, 2023
@NingLin-P NingLin-P deleted the fix-notification-ack branch April 7, 2023 09:33
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.

invalid_execution_proof_should_not_work fails under high CPU load
3 participants