KeeProMise commented on code in PR #7254:
URL: https://github.com/apache/hadoop/pull/7254#discussion_r1899255240
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java:
##########
@@ -1246,6 +1249,7 @@ private void receiveRpcResponse() {
if (status == RpcStatusProto.SUCCESS) {
Writable value = packet.newInstance(valueClass, conf);
final Call call = calls.remove(callId);
+ releaseAsyncCallPermit();
Review Comment:
I think we can add a removeCall method in the connect class, and modify the
existing addCall method to include a checkAsyncCall function.
```java
/**
* Add a call to this connection's call queue and notify
* a listener; synchronized.
* Returns false if called during shutdown.
* @param call to add
* @return true if the call was added.
*/
private synchronized boolean addCall(Call call) {
if (shouldCloseConnection.get())
return false;
checkAsyncCall();
calls.put(call.id, call);
notify();
return true;
}
private void removeCall(int callId) {
final Call call = calls.remove(callId);
releaseAsyncCallPermit();
}
```
--
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]