[ 
https://issues.apache.org/jira/browse/RATIS-845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

runzhiwang updated RATIS-845:
-----------------------------
    Description: 
*What's the problem ? *
As the image shows, there are 245 instances of  RaftServerImpl, but the map in 
RaftServerProxy has only 16 entries.  Because all the RaftServerImpl will be 
put into the map in RaftServerProxy. So 229 instances of RaftServerImpl happen 
memory leak.
 
!screenshot-3.png! 
 !screenshot-2.png! 

*What's the reason ?*

When call 
[RaftServerProxy::remove|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java#L94],
 it did not call 
[RaftServerImp:shutdown:|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java#L247].
 




  was:

*What's the problem ? *
As the image shows, there are 245 instances of  RaftServerImpl, but the map in 
RaftServerProxy has only 16 entries.  Because all the RaftServerImpl will be 
put into the map in RaftServerProxy. So 229 instances of RaftServerImpl happen 
memory leak.
 !screenshot-3.png! 
 !screenshot-2.png! 

*What's the reason ?*
When call 
[RaftServerProxy::remove|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java#L94],
 it did not call 
[RaftServerImp:shutdown:|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java#L247].
 





> Memory leak of RaftServerImpl
> -----------------------------
>
>                 Key: RATIS-845
>                 URL: https://issues.apache.org/jira/browse/RATIS-845
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: runzhiwang
>            Priority: Major
>         Attachments: screenshot-2.png, screenshot-3.png
>
>
> *What's the problem ? *
> As the image shows, there are 245 instances of  RaftServerImpl, but the map 
> in RaftServerProxy has only 16 entries.  Because all the RaftServerImpl will 
> be put into the map in RaftServerProxy. So 229 instances of RaftServerImpl 
> happen memory leak.
>  
> !screenshot-3.png! 
>  !screenshot-2.png! 
> *What's the reason ?*
> When call 
> [RaftServerProxy::remove|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java#L94],
>  it did not call 
> [RaftServerImp:shutdown:|https://github.com/apache/incubator-ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java#L247].
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to