-
Notifications
You must be signed in to change notification settings - Fork 275
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
Default to use netty bytebuf in network layer and remove getAndRelease method #1375
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1375 +/- ##
============================================
+ Coverage 72.35% 72.51% +0.15%
+ Complexity 6867 6861 -6
============================================
Files 496 496
Lines 38854 38782 -72
Branches 4940 4927 -13
============================================
+ Hits 28113 28122 +9
+ Misses 9383 9308 -75
+ Partials 1358 1352 -6
Continue to review full report at Codecov.
|
ambry-api/src/main/java/com.github.ambry/network/NetworkRequest.java
Outdated
Show resolved
Hide resolved
ambry-api/src/main/java/com.github.ambry/network/BoundedNettyByteBufReceive.java
Outdated
Show resolved
Hide resolved
1029456
to
765be42
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.
a few comments
ambry-api/src/main/java/com.github.ambry/network/BoundedNettyByteBufReceive.java
Outdated
Show resolved
Hide resolved
ambry-api/src/main/java/com.github.ambry/network/BoundedNettyByteBufReceive.java
Outdated
Show resolved
Hide resolved
ambry-api/src/main/java/com.github.ambry/network/ResponseInfo.java
Outdated
Show resolved
Hide resolved
ambry-api/src/main/java/com.github.ambry/network/ResponseInfo.java
Outdated
Show resolved
Hide resolved
ambry-messageformat/src/main/java/com.github.ambry.messageformat/BlobData.java
Outdated
Show resolved
Hide resolved
ambry-network/src/main/java/com.github.ambry.network/LocalRequestResponseChannel.java
Show resolved
Hide resolved
ambry-network/src/main/java/com.github.ambry.network/SocketRequestResponseChannel.java
Outdated
Show resolved
Hide resolved
SocketServerRequest req = new SocketServerRequest(id, connectionId, buffer, | ||
Utils.createDataInputStreamFromBuffer(buffer, networkConfig.networkPutRequestShareMemory)); | ||
ByteBuf buffer = networkReceive.getReceivedBytes().content(); | ||
SocketServerRequest req = new SocketServerRequest(id, connectionId, buffer); |
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.
who is supposed to release the buffer?
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.
in the RequestHandler, we have a for loop to get the request out and after dealing with the request, we release it.
This pr includes two changes: