Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.X, Master
-
7.0.x
-
Committed
-
3
Description
Description
When calling the ChannelHubManagerUtil#destroyChannel method, a ClusterRequest is created to call the same method on other nodes. The ClusterRequest is not set to fireAndForget, meaning that the node that sent the request awaits a response from the receiving node. However, this method returns void, and as far as I can tell, there is no possibility of an exception being thrown by ClusterExecutorUtil#execute, even if the ClusterNodeResponse has an exception. Therefore, there is no reason not to set the ClusterRequest to fireAndForget. By setting it to fireAndForget we can avoid some unnecessary waiting by the node that sent the request, as well as some unnecessary processing by the node that received the request.
This also can lead to unnecessary INFO [default-40][ClusterExecutorImpl:497] Unable to get response container for [UUID] messages occasionally appearing in the logs, depending on the timing of when the JVM's garbage collector decides to clean out the no-longer referenced objects in the _futureClusterResponses map. Since the thread sending the request lets go of its reference to the FutureClusterResponses, the JVM's garbage collector can potentially remove the entry from the map before the ClusterNodeResponse is processed by its thread, triggering this if block
Steps to Reproduce
N/A.