From 918f8bf54a4aeffc3c0ef4ad1fa31ce93bbc1346 Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Wed, 23 Jun 2010 18:59:42 +0000 Subject: Make file deletions async to avoid pauses during compaction and db deletion. Fixes COUCHDB-780. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@957303 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_server.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/couchdb/couch_server.erl') diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl index f2403ef7..c2313aef 100644 --- a/src/couchdb/couch_server.erl +++ b/src/couchdb/couch_server.erl @@ -320,9 +320,9 @@ handle_call({delete, DbName, _Options}, _From, Server) -> %% Delete any leftover .compact files. If we don't do this a subsequent %% request for this DB will try to open the .compact file and use it. - file:delete(FullFilepath ++ ".compact"), + couch_file:delete(FullFilepath ++ ".compact"), - case file:delete(FullFilepath) of + case couch_file:delete(FullFilepath) of ok -> couch_db_update_notifier:notify({deleted, DbName}), {reply, ok, Server2}; -- cgit v1.2.3