As recommended here, it is advised to call close on gRPC.ClientConn whenever the application intends to not use it anymore ..
On Refresh(..), N1FTY sets up a new set of ClientConns' to FTS servers but does not close the dereferenced ClientConns. This will need fixing.
I used this command to track the number of open gRPC connections ..
With some code instrumenting by forcing indexer refreshes continuously - I'm able to see that the gRPC connections count (available from the above command) grow over time. The fix for this issue ensures that the number remains constant despite continuous refresh.
|For Gerrit Dashboard: MB-41585|
|136656,4||MB-41585: Tear down old gRPC ClientConns on indexer.Refresh||master||n1fty||Status: MERGED||+2||+1|
|136708,2||MB-41585: [BP] Tear down old gRPC ClientConns on indexer.Refresh||mad-hatter||n1fty||Status: MERGED||+2||+1|
|136741,1||Merge remote-tracking branch 'origin/mad-hatter'||master||n1fty||Status: MERGED||+2||+1|
|136750,2||MB-41603: [BP] Tear down old gRPC ClientConns on indexer.Refresh||6.5.1||n1fty||Status: MERGED||+2||+1|