summaryrefslogtreecommitdiff
path: root/src/couch_index
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2011-09-23 19:56:14 +0000
committerPaul Joseph Davis <davisp@apache.org>2011-09-23 19:56:14 +0000
commita89426f7cf571b7f64d3290c684715bab4408299 (patch)
tree8e8721ebf329ec582898ca427c4f4b05ea847145 /src/couch_index
parent48dc9612d1c5043847dfaacd18f3f82f0400f515 (diff)
downloadcouchdb-a89426f7cf571b7f64d3290c684715bab4408299.tar.gz
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
Diffstat (limited to 'src/couch_index')
-rw-r--r--src/couch_index/src/couch_index_compactor.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/couch_index/src/couch_index_compactor.erl b/src/couch_index/src/couch_index_compactor.erl
index b8b1eccf0..72bff514c 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),