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

Fix a bug in LongPriorityQueue internal remove #10832

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

chrisvest
Copy link
Contributor

Motivation:
We rely on this functionality in PoolChunk, and a bug was caught by a non-deterministic test failure

Modification:
Went back to the Algorithms book, and reimplemented remove() the way it was meant to.

Result:
No test failures after 200.000 runs, so we have some confidence the code is correct now.

Motivation:
We rely on this functionality in PoolChunk, and a bug was caught by a non-deterministic test failure

Modification:
Went back to the Algorithms book, and reimplemented remove() the way it was meant to.

Result:
No test failures after 200.000 runs, so we have some confidence the code is correct now.
@normanmaurer
Copy link
Member

@chrisvest would be interesting to re-run the benchmarks with this one

@normanmaurer normanmaurer added this to the 4.1.55.Final milestone Dec 2, 2020
@chrisvest
Copy link
Contributor Author

After this PR:

Benchmark                                         Mode  Cnt        Score        Error  Units
PooledByteBufAllocatorBenchmark.allocateAndFree  thrpt   20  6366087.034 ± 124944.987  ops/s

Which compares well with what we saw in #10826

@normanmaurer normanmaurer merged commit d2e16fb into netty:4.1 Dec 2, 2020
@normanmaurer
Copy link
Member

@chrisvest thanks a lot for the fast turnaround.

normanmaurer pushed a commit that referenced this pull request Dec 2, 2020
Motivation:
We rely on this functionality in PoolChunk, and a bug was caught by a non-deterministic test failure

Modification:
Went back to the Algorithms book, and reimplemented remove() the way it was meant to.

Result:
No test failures after 200.000 runs, so we have some confidence the code is correct now.
@chrisvest chrisvest deleted the 41-long-pq-internal-remove branch December 2, 2020 13:13
raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
Motivation:
We rely on this functionality in PoolChunk, and a bug was caught by a non-deterministic test failure

Modification:
Went back to the Algorithms book, and reimplemented remove() the way it was meant to.

Result:
No test failures after 200.000 runs, so we have some confidence the code is correct now.
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.

None yet

2 participants