couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject [39/50] git commit: Commit the compacted index before returning it.
Date Wed, 26 Oct 2011 18:05:33 GMT
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



git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1174984 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/a89426f7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a89426f7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a89426f7

Branch: refs/heads/1319-large-headers-are-corrupted
Commit: a89426f7cf571b7f64d3290c684715bab4408299
Parents: 48dc961
Author: Paul Joseph Davis <davisp@apache.org>
Authored: Fri Sep 23 19:56:14 2011 +0000
Committer: Paul Joseph Davis <davisp@apache.org>
Committed: Fri Sep 23 19:56:14 2011 +0000

----------------------------------------------------------------------
 src/couch_index/src/couch_index_compactor.erl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/a89426f7/src/couch_index/src/couch_index_compactor.erl
----------------------------------------------------------------------
diff --git a/src/couch_index/src/couch_index_compactor.erl b/src/couch_index/src/couch_index_compactor.erl
index b8b1ecc..72bff51 100644
--- a/src/couch_index/src/couch_index_compactor.erl
+++ b/src/couch_index/src/couch_index_compactor.erl
@@ -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