summaryrefslogtreecommitdiff
path: root/apps/couch/src
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2011-01-13 16:04:43 -0500
committerAdam Kocoloski <adam@cloudant.com>2011-01-13 16:12:16 -0500
commit7fbc3834011e6e815748944ab75850039fbb45c4 (patch)
tree439e969b34877e6b807e7377a12127fb83b8f26b /apps/couch/src
parent9edb8e9cdeba88c1d56a41658eadbd50c515d18f (diff)
Monitor sys_db file descriptor to keep it open
A couch_file process occasionally checks to see if it is being monitored by any clients, and closes if not. Specifically, it checks for at least two monitoring processes, because it assumes couch_stats_collector is one of them. That assumption was wrong for sys_db files, so they would shut down after a minute and need to be reopened. BugzID: 11641
Diffstat (limited to 'apps/couch/src')
-rw-r--r--apps/couch/src/couch_file.erl9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/couch/src/couch_file.erl b/apps/couch/src/couch_file.erl
index a8a465af..9c06a44e 100644
--- a/apps/couch/src/couch_file.erl
+++ b/apps/couch/src/couch_file.erl
@@ -270,13 +270,8 @@ init({Filepath, Options, ReturnPid, Ref}) ->
end
end.
-maybe_track_open_os_files(FileOptions) ->
- case lists:member(sys_db, FileOptions) of
- true ->
- ok;
- false ->
- couch_stats_collector:track_process_count({couchdb, open_os_files})
- end.
+maybe_track_open_os_files(_FileOptions) ->
+ couch_stats_collector:track_process_count({couchdb, open_os_files}).
terminate(_Reason, #file{fd = nil}) ->
ok;