couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r775785 - /couchdb/trunk/src/couchdb/couch_server.erl
Date Mon, 18 May 2009 00:50:05 GMT
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}),



Mime
View raw message