couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [1/3] couch commit: updated refs/heads/windsor-merge to 42c89cd
Date Mon, 11 Aug 2014 17:58:29 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/windsor-merge 481fa52e9 -> 42c89cd40


Garbage collect OS process Pids

The amount of data flowing through these pids to the ports can cause a
significant amount of garbage to accumulate. This just reacts to a
request from the proc manager to occasionally garbage collect.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/075254c5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/075254c5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/075254c5

Branch: refs/heads/windsor-merge
Commit: 075254c50f092c4d9b3adf07c61d916dc60e3830
Parents: 481fa52
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Mon Aug 11 12:55:28 2014 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Mon Aug 11 12:55:28 2014 -0500

----------------------------------------------------------------------
 src/couch_os_process.erl | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/075254c5/src/couch_os_process.erl
----------------------------------------------------------------------
diff --git a/src/couch_os_process.erl b/src/couch_os_process.erl
index 676d540..8aaf5db 100644
--- a/src/couch_os_process.erl
+++ b/src/couch_os_process.erl
@@ -207,6 +207,9 @@ handle_cast({send, Data}, #os_proc{writer=Writer, idle=Idle}=OsProc) ->
             ?LOG_ERROR("Failed sending data: ~p -> ~p", [Data, OsError]),
             {stop, normal, OsProc}
     end;
+handle_cast(garbage_collect, #os_proc{idle=Idle}=OsProc) ->
+    erlang:garbage_collect(),
+    {noreply, OsProc, Idle};
 handle_cast(stop, OsProc) ->
     {stop, normal, OsProc};
 handle_cast(Msg, #os_proc{idle=Idle}=OsProc) ->


Mime
View raw message