-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Change '>=' back to '>' to fix recycling of blobs/packets #1192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotta have a test for patches like this. Super hard to debug, and no I/O, so easy to test.
@garious actually how would you test it, since it seems the external effects from going through that path are kind of the same. self.gc.len() will be the same, the only difference is if I got a re-used one or a new one but I'm not sure how I tell the difference in those. I guess I can go with the counter change then I can check those but it seems fragile. |
Modify the packet before recycling and |
9139112
to
680e8bf
Compare
Recycler will have a strong ref to the item so it will be at least 1, >= will always prevent recycling.
680e8bf
to
da0b1e7
Compare
@garious test added, take a look when you can. |
…olana-labs#1192) Bumps [rollup](https://github.com/rollup/rollup) from 2.38.4 to 2.38.5. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](rollup/rollup@v2.38.4...v2.38.5) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* program cache: reduce contention Before this change we used to take the write lock to extract(). This means that even in the ideal case (all programs are already cached), the cache was contended by all batches and all operations were serialized. With this change we now take the write lock only when we store a new entry in the cache, and take the read lock to extract(). This means that in the common case where most/all programs are cached, there is no contention and all batches progress in parallel. This improves node replay perf by 20-25% on current mnb traffic. * ProgramCache: remove SecondLevel structure
Recycler will have a strong ref to the item so it will be at
least 1, >= will always prevent recycling.