symious commented on code in PR #1179:
URL: https://github.com/apache/ratis/pull/1179#discussion_r1855179772
##########
ratis-netty/src/main/java/org/apache/ratis/netty/server/DataStreamManagement.java:
##########
@@ -423,6 +428,7 @@ private void removeDataStream(ClientInvocationId
invocationId, StreamInfo info)
if (info != null) {
info.getDivision().getDataStreamMap().remove(invocationId);
info.getLocal().cleanUp();
+ info.applyToRemotes(out -> out.out.closeAsync());
Review Comment:
Updated, PTAL
##########
ratis-netty/src/main/java/org/apache/ratis/netty/server/DataStreamManagement.java:
##########
@@ -390,8 +390,13 @@ static void sendDataStreamException(Throwable throwable,
DataStreamRequestByteBu
void cleanUp(Set<ClientInvocationId> ids) {
for (ClientInvocationId clientInvocationId : ids) {
Optional.ofNullable(streams.remove(clientInvocationId))
- .map(StreamInfo::getLocal)
- .ifPresent(LocalStream::cleanUp);
+ .ifPresent(streamInfo -> {
+ streamInfo.getDivision()
+ .getDataStreamMap()
+ .remove(clientInvocationId);
+ streamInfo.getLocal().cleanUp();
+ streamInfo.applyToRemotes(out -> out.out.closeAsync());
+ });
Review Comment:
Updated, PTAL.
--
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]