diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-07-08 19:23:33 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-07-08 19:23:33 +0000 |
commit | f3442c25ae26369a516cf12b94f86cdec406c5b6 (patch) | |
tree | 496ead6461728e5b64047c0029f03e8dc8c0ad99 /src/couchdb/couch_view_group.erl | |
parent | 5c55239750edc5540825ef0bbf83fccb1bed459f (diff) |
Fix deletion of view files after compaction.
Also added test for view compaction.
Thanks Adam for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@961893 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_view_group.erl')
-rw-r--r-- | src/couchdb/couch_view_group.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_view_group.erl b/src/couchdb/couch_view_group.erl index 8d3a3d86..f01befdf 100644 --- a/src/couchdb/couch_view_group.erl +++ b/src/couchdb/couch_view_group.erl @@ -186,7 +186,7 @@ handle_cast({compact_done, #group{current_seq=NewSeq} = NewGroup}, ?LOG_INFO("View index compaction complete for ~s ~s", [DbName, GroupId]), FileName = index_file_name(RootDir, DbName, GroupSig), CompactName = index_file_name(compact, RootDir, DbName, GroupSig), - couch_file:delete(FileName), + ok = couch_file:delete(RootDir, FileName), ok = file:rename(CompactName, FileName), %% if an updater is running, kill it and start a new one @@ -545,7 +545,7 @@ reset_file(Db, Fd, DbName, #group{sig=Sig,name=Name} = Group) -> init_group(Db, Fd, reset_group(Group), nil). delete_index_file(RootDir, DbName, GroupSig) -> - couch_file:delete(index_file_name(RootDir, DbName, GroupSig)). + couch_file:delete(RootDir, index_file_name(RootDir, DbName, GroupSig)). init_group(Db, Fd, #group{views=Views}=Group, nil) -> init_group(Db, Fd, Group, |