You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/01/19 18:21:37 UTC
[1/2] couch commit: updated refs/heads/master to 6e45e7b
Repository: couchdb-couch
Updated Branches:
refs/heads/master 74eefe9d6 -> 6e45e7b54
Modify init_delete_dir to be async
In the case when .delete directory contains lots of files.
The deletion of the directory leads to timeout in the supervisor.
Which in it's turn kills the node.
COUCHDB-2524
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/b7e4a440
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/b7e4a440
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/b7e4a440
Branch: refs/heads/master
Commit: b7e4a4409bd9f114011b6a7e970258d34a55996a
Parents: a4dbd64
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed Jan 7 11:00:19 2015 -0800
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Mon Jan 19 06:54:32 2015 -0800
----------------------------------------------------------------------
src/couch_file.erl | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/b7e4a440/src/couch_file.erl
----------------------------------------------------------------------
diff --git a/src/couch_file.erl b/src/couch_file.erl
index 3ebf608..1a47d2b 100644
--- a/src/couch_file.erl
+++ b/src/couch_file.erl
@@ -260,10 +260,13 @@ init_delete_dir(RootDir) ->
% note: ensure_dir requires an actual filename companent, which is the
% reason for "foo".
filelib:ensure_dir(filename:join(Dir,"foo")),
- filelib:fold_files(Dir, ".*", true,
- fun(Filename, _) ->
- ok = file:delete(Filename)
- end, ok).
+ spawn(fun() ->
+ filelib:fold_files(Dir, ".*", true,
+ fun(Filename, _) ->
+ ok = file:delete(Filename)
+ end, ok)
+ end),
+ ok.
read_header(Fd) ->
[2/2] couch commit: updated refs/heads/master to 6e45e7b
Posted by kx...@apache.org.
Merge remote-tracking branch 'iilyak/2524-cleanup-delete-on-init'
This closes #27
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/6e45e7b5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/6e45e7b5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/6e45e7b5
Branch: refs/heads/master
Commit: 6e45e7b547c1ab30bddc3af26b7f88415b8951f9
Parents: 74eefe9 b7e4a44
Author: Alexander Shorin <kx...@apache.org>
Authored: Mon Jan 19 20:20:30 2015 +0300
Committer: Alexander Shorin <kx...@apache.org>
Committed: Mon Jan 19 20:20:30 2015 +0300
----------------------------------------------------------------------
src/couch_file.erl | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------