diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2009-05-18 00:50:12 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2009-05-18 00:50:12 +0000 |
commit | 645526fe5f580455049e63d4d6ab1ac03bdb2213 (patch) | |
tree | 198e7d7042e1581142e01efcd5ea6b1dde3dc12f /src/couchdb | |
parent | 5ff2faec548f4db6688a25aac2f704e6894c7bc9 (diff) |
remove leftover .compact files on DB delete
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@775785 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_server.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl index c1908629..3bf59724 100644 --- a/src/couchdb/couch_server.erl +++ b/src/couchdb/couch_server.erl @@ -303,6 +303,11 @@ handle_call({delete, DbName, _Options}, _From, Server) -> true = ets:delete(couch_dbs_by_lru, LruTime), Server#server{dbs_open=Server#server.dbs_open - 1} end, + + %% 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"), + case file:delete(FullFilepath) of ok -> couch_db_update_notifier:notify({deleted, DbName}), |