couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1174984 - /couchdb/trunk/src/couch_index/src/couch_index_compactor.erl
Date Fri, 23 Sep 2011 19:56:14 GMT
Author: davisp
Date: Fri Sep 23 19:56:14 2011
New Revision: 1174984

URL: http://svn.apache.org/viewvc?rev=1174984&view=rev
Log:
Commit the compacted index before returning it.

Failing to compact here could cause errors trying to resume a compaction
due to timeouts while searching for a header.

See COUCHDB-994


Modified:
    couchdb/trunk/src/couch_index/src/couch_index_compactor.erl

Modified: couchdb/trunk/src/couch_index/src/couch_index_compactor.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couch_index/src/couch_index_compactor.erl?rev=1174984&r1=1174983&r2=1174984&view=diff
==============================================================================
--- couchdb/trunk/src/couch_index/src/couch_index_compactor.erl (original)
+++ couchdb/trunk/src/couch_index/src/couch_index_compactor.erl Fri Sep 23 19:56:14 2011
@@ -103,6 +103,7 @@ compact(Idx, Mod, IdxState, Opts) ->
     {ok, NewIdxState} = couch_util:with_db(DbName, fun(Db) ->
         Mod:compact(Db, IdxState, Opts)
     end),
+    ok = Mod:commit(NewIdxState),
     case gen_server:call(Idx, {compacted, NewIdxState}) of
         recompact ->
             ?LOG_INFO("Compaction restarting for db: ~s idx: ~s", Args),



Mime
View raw message