-
Notifications
You must be signed in to change notification settings - Fork 30
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
Simplify Netty RefCounting and ByteBuf Consumption #592
Simplify Netty RefCounting and ByteBuf Consumption #592
Conversation
537bad1
to
e9db598
Compare
e9db598
to
3e32e71
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #592 +/- ##
============================================
- Coverage 76.02% 75.85% -0.17%
- Complexity 1494 1495 +1
============================================
Files 162 165 +3
Lines 6348 6362 +14
Branches 572 573 +1
============================================
Hits 4826 4826
- Misses 1145 1158 +13
- Partials 377 378 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c9d6bfe
to
8ed510f
Compare
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.
Thanks for putting this together. I don't see any blockers, but I'd like to see this again after final cleanup.
...ure/trafficReplayer/src/main/java/org/opensearch/migrations/replay/HttpByteBufFormatter.java
Outdated
Show resolved
Hide resolved
...rafficReplayer/src/main/java/org/opensearch/migrations/replay/ParsedHttpMessagesAsDicts.java
Outdated
Show resolved
Hide resolved
...rafficReplayer/src/main/java/org/opensearch/migrations/replay/ParsedHttpMessagesAsDicts.java
Show resolved
Hide resolved
...apture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/util/ByteBufUtils.java
Outdated
Show resolved
Hide resolved
...icReplayer/src/test/java/org/opensearch/migrations/replay/RequestSenderOrchestratorTest.java
Show resolved
Hide resolved
.../trafficReplayer/src/main/java/org/opensearch/migrations/replay/util/RefSafeStreamUtils.java
Outdated
Show resolved
Hide resolved
...pture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/util/RefSafeHolder.java
Outdated
Show resolved
Hide resolved
...trafficReplayer/src/test/java/org/opensearch/migrations/replay/HttpByteBufFormatterTest.java
Outdated
Show resolved
Hide resolved
8ed510f
to
a272676
Compare
f01cc18
to
2cae6e6
Compare
Updated addressing all suggestions from your first review @gregschohn |
2cae6e6
to
7f9480b
Compare
...rafficReplayer/src/main/java/org/opensearch/migrations/replay/ParsedHttpMessagesAsDicts.java
Outdated
Show resolved
Hide resolved
...cCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/util/NettyUtils.java
Outdated
Show resolved
Hide resolved
...trafficReplayer/src/test/java/org/opensearch/migrations/replay/HttpByteBufFormatterTest.java
Outdated
Show resolved
Hide resolved
.../trafficReplayer/src/main/java/org/opensearch/migrations/replay/util/RefSafeStreamUtils.java
Show resolved
Hide resolved
…n helpers for refSafe stream mappings Signed-off-by: Andre Kurait <[email protected]>
Signed-off-by: Andre Kurait <[email protected]>
… class Signed-off-by: Andre Kurait <[email protected]>
Signed-off-by: Andre Kurait <[email protected]>
Signed-off-by: Andre Kurait <[email protected]>
…d streams Signed-off-by: Andre Kurait <[email protected]>
7f9480b
to
06d0417
Compare
…atic imports Signed-off-by: Andre Kurait <[email protected]>
24aabd1
to
a84815e
Compare
Signed-off-by: Andre Kurait <[email protected]>
a84815e
to
0b81a2c
Compare
Signed-off-by: Andre Kurait <[email protected]>
…h-project#592)" This reverts commit 9df3614.
…h-project#592)" This reverts commit 9df3614.
…h-project#592)" This reverts commit 9df3614.
…h-project#592)" This reverts commit 9df3614.
Description
Previously, we relied on stream mapping to create the byte buffs with an assumption that no exception would occur in the stream mapping. There was some uncertainty regarding lazy processing of the stream, and overall it was difficult to reason with.
This change seeks to simplify this behavior by introducing a helper method
ByteBufUtils::createRefCntNeutralCloseableByteBufStream
which constructs a byte buf stream from a collection of byte arrays that keeps track of the reference counted objects it creates and releases them upon the Stream:close which can be leveraged by try-with-resources constructs.This change also adds in static semantic analysis with google error-prone
MustBeClosed
Issues Resolved
MIGRATIONS-1665
Is this a backport? If so, please add backport PR # and/or commits #
Testing
Unit Testing, deployed to AWS and tested with high throughput to verify no regressions in leaks or ref count issues. (Still seeing some with high load, but not seeing regressions due to this)
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.