You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/11/26 17:21:28 UTC

[GitHub] [couchdb] nickva commented on a change in pull request #3851: fix memleak in couch_peruser, patch by @rnewson

nickva commented on a change in pull request #3851:
URL: https://github.com/apache/couchdb/pull/3851#discussion_r757632980



##########
File path: src/couch_peruser/src/couch_peruser.erl
##########
@@ -71,8 +71,10 @@
 start_link() ->
     gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
 
--spec init_state() -> #state{}.
-init_state() ->
+reset_state(#state{mem3_cluster_pid = Pid} = State) when is_pid(Pid) ->
+    unlink(Pid),

Review comment:
       Here we just unlink the process, but the process would still be alive and we'd be accumulating them and each one would still be sending stable|unstable event. The memleak is not from the links themselves but from the number of processes spawned.
   
   




-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org