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

Switch from using Mutex to Channels for filters #326

Closed
aakoshh opened this issue Jul 11, 2023 · 0 comments · Fixed by consensus-shipyard/fendermint#142
Closed

Switch from using Mutex to Channels for filters #326

aakoshh opened this issue Jul 11, 2023 · 0 comments · Fixed by consensus-shipyard/fendermint#142

Comments

@aakoshh
Copy link
Contributor

aakoshh commented Jul 11, 2023

consensus-shipyard/fendermint#139 introduces filtering which requires multiple background subscriptions made to the Tendermint web socket API. The state is managed by filter-level Mutexes which need to be taken out for reading and writing, blocking a tokio thread while doing so. This introduces logs of contention on subscriptions that contain OR conditions, as they all require a separate subscription, all racing to take a lock out on the same thing.

Change things so that there is a background process associated with the filter which reacts to read and write commands arriving over a channel, so subscriptions don't become blocked by each other or a reader.

@jsoares jsoares transferred this issue from consensus-shipyard/fendermint Dec 19, 2023
@jsoares jsoares closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants