Created
August 7, 2010 19:07
-
-
Save tilgovi/513081 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/couchdb/couch_db_updater.erl b/src/couchdb/couch_db_updater.erl | |
index f087970..deba810 100644 | |
--- a/src/couchdb/couch_db_updater.erl | |
+++ b/src/couchdb/couch_db_updater.erl | |
@@ -175,7 +175,7 @@ handle_cast({compact_done, CompactFilepath}, #db{filepath=Filepath}=Db) -> | |
NewDb2 = commit_data(NewDb#db{ | |
local_docs_btree = NewLocalBtree, | |
main_pid = Db#db.main_pid, | |
- filepath = Filepath, | |
+ filepath = CompactFilepath, | |
instance_start_time = Db#db.instance_start_time, | |
revs_limit = Db#db.revs_limit | |
}), | |
@@ -188,7 +188,7 @@ handle_cast({compact_done, CompactFilepath}, #db{filepath=Filepath}=Db) -> | |
close_db(Db), | |
ok = gen_server:call(Db#db.main_pid, {db_updated, NewDb2}), | |
?LOG_INFO("Compaction for db \"~s\" completed.", [Db#db.name]), | |
- {noreply, NewDb2#db{compactor_pid=nil}}; | |
+ {noreply, NewDb2#db{compactor_pid=nil,filepath=Filepath}}; | |
false -> | |
?LOG_INFO("Compaction file still behind main file " | |
"(update seq=~p. compact update seq=~p). Retrying.", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment