summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_file.erl
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2009-03-16 19:14:37 +0000
committerDamien F. Katz <damien@apache.org>2009-03-16 19:14:37 +0000
commit41841a800df5922133648d82a9f5dd5ec2562b42 (patch)
tree4842cf75fe8cd1868f4735dd755add87d1adb372 /src/couchdb/couch_file.erl
parent2adbe68f0922aa2f2d0d8d4af35c4d96534730d6 (diff)
Fix for problem with btree folds getting incorrect reductions after the first value.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@754982 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_file.erl')
-rw-r--r--src/couchdb/couch_file.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl
index 4db55e70..ecab455b 100644
--- a/src/couchdb/couch_file.erl
+++ b/src/couchdb/couch_file.erl
@@ -285,14 +285,14 @@ init({Filepath, Options, ReturnPid, Ref}) ->
true ->
{ok, 0} = file:position(Fd, 0),
ok = file:truncate(Fd),
- couch_stats_collector:increment({couchdb, open_os_files}),
+ catch couch_stats_collector:increment({couchdb, open_os_files}),
{ok, Fd};
false ->
ok = file:close(Fd),
init_status_error(ReturnPid, Ref, file_exists)
end;
false ->
- couch_stats_collector:increment({couchdb, open_os_files}),
+ catch couch_stats_collector:increment({couchdb, open_os_files}),
{ok, Fd}
end;
Error ->
@@ -304,7 +304,7 @@ init({Filepath, Options, ReturnPid, Ref}) ->
{ok, Fd_Read} ->
{ok, Fd} = file:open(Filepath, [read, write, raw, binary]),
ok = file:close(Fd_Read),
- couch_stats_collector:increment({couchdb, open_os_files}),
+ catch couch_stats_collector:increment({couchdb, open_os_files}),
{ok, Fd};
Error ->
init_status_error(ReturnPid, Ref, Error)
@@ -313,7 +313,7 @@ init({Filepath, Options, ReturnPid, Ref}) ->
terminate(_Reason, _Fd) ->
- couch_stats_collector:decrement({couchdb, open_os_files}),
+ catch couch_stats_collector:decrement({couchdb, open_os_files}),
ok.