You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2009/05/18 02:50:05 UTC

svn commit: r775785 - /couchdb/trunk/src/couchdb/couch_server.erl

Author: kocolosk
Date: Mon May 18 00:50:04 2009
New Revision: 775785

URL: http://svn.apache.org/viewvc?rev=775785&view=rev
Log:
remove leftover .compact files on DB delete

Modified:
    couchdb/trunk/src/couchdb/couch_server.erl

Modified: couchdb/trunk/src/couchdb/couch_server.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_server.erl?rev=775785&r1=775784&r2=775785&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_server.erl (original)
+++ couchdb/trunk/src/couchdb/couch_server.erl Mon May 18 00:50:04 2009
@@ -303,6 +303,11 @@
             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}),