diff options
author | Robert Newson <rnewson@apache.org> | 2010-11-10 18:44:45 +0000 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2010-11-10 18:44:45 +0000 |
commit | 1f7e7cb5c22302788e232ce455fd0505f6420201 (patch) | |
tree | 8223ba01322f12483d09e0ce99a267e89452d638 /src/couchdb/couch_db_updater.erl | |
parent | 61a64a228e132bf1f32b248b2ce4c34a7d01e87d (diff) |
COUCHDB-945 - ensure validation funs are still applied after compaction.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1033640 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db_updater.erl')
-rw-r--r-- | src/couchdb/couch_db_updater.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/couchdb/couch_db_updater.erl b/src/couchdb/couch_db_updater.erl index 928c305d..3571fd5e 100644 --- a/src/couchdb/couch_db_updater.erl +++ b/src/couchdb/couch_db_updater.erl @@ -186,9 +186,10 @@ handle_cast({compact_done, CompactFilepath}, #db{filepath=Filepath}=Db) -> couch_file:delete(RootDir, Filepath), ok = file:rename(CompactFilepath, Filepath), close_db(Db), - ok = gen_server:call(Db#db.main_pid, {db_updated, NewDb2}, infinity), + NewDb3 = refresh_validate_doc_funs(NewDb2), + ok = gen_server:call(Db#db.main_pid, {db_updated, NewDb3}, infinity), ?LOG_INFO("Compaction for db \"~s\" completed.", [Db#db.name]), - {noreply, NewDb2#db{compactor_pid=nil}}; + {noreply, NewDb3#db{compactor_pid=nil}}; false -> ?LOG_INFO("Compaction file still behind main file " "(update seq=~p. compact update seq=~p). Retrying.", |