Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Commit the compacted index before returning it.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
davisp committed Sep 23, 2011
1 parent 48dc961 commit a89426f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/couch_index/src/couch_index_compactor.erl
Expand Up @@ -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),
Expand Down

0 comments on commit a89426f

Please sign in to comment.