rickyma commented on code in PR #1605:
URL:
https://github.com/apache/incubator-uniffle/pull/1605#discussion_r1541156103
##########
server/src/main/java/org/apache/uniffle/server/netty/ShuffleServerNettyHandler.java:
##########
@@ -459,29 +463,27 @@ public void handleGetLocalShuffleData(TransportClient
client, GetLocalShuffleDat
storageType,
offset,
length);
- long readTime = System.currentTimeMillis() - start;
- ShuffleServerMetrics.counterTotalReadTime.inc(readTime);
ShuffleServerMetrics.counterTotalReadDataSize.inc(sdr.getDataLength());
ShuffleServerMetrics.counterTotalReadLocalDataFileSize.inc(sdr.getDataLength());
- shuffleServer
- .getNettyMetrics()
- .recordProcessTime(GetLocalShuffleDataRequest.class.getName(),
readTime);
- LOG.info(
- "Successfully getShuffleData cost {} ms for shuffle" + " data with
{}",
- readTime,
- requestInfo);
response =
new GetLocalShuffleDataResponse(
req.getRequestId(), status, msg, sdr.getManagedBuffer());
+ ReleaseMemoryAndRecordReadTimeListener listener =
+ new ReleaseMemoryAndRecordReadTimeListener(
+ start, length, sdr.getDataLength(), requestInfo, req, client);
+ client.getChannel().writeAndFlush(response).addListener(listener);
+ return;
} catch (Exception e) {
+ shuffleServer.getShuffleBufferManager().releaseReadMemory(length);
Review Comment:
```
throw new RssException("Can not handle request " + request.type());
```
You mean this code snippet? I think we will never reach here, so it's fine
we do anything. It's like you use `assert` to make sure something will not
happen. And if it happens, it must be a serious bug that needs to be fixed
immediately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]