| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human! -- conventional-commit-lint bot |
Sorry, something went wrong.
| with self._lock: | ||
| self.inflight_mutations += batch_info.mutations_count | ||
| self.inflight_size += batch_info.mutations_size | ||
| self.set_flow_control_status() |
There was a problem hiding this comment.
I believe we can keep set_flow_control_status out of the lock. Even if it occasionally gets clobbered by later changes, every add and release ends with another call to set_flow_control_status, so it should be eventually correct.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The MutationBatcher's _FlowControl class currently can experience a race condition, where the release of resources can be clobbered by a different thread adding resources to the flow. This can result in deadlock, where the flow is empty, but remains blocked waiting on mutations that are already complete
This PR adds a mutex lock, ensuring that only one thread has access to the flow control state at a time.