davisp commented on a change in pull request #597: Move view index files to
.view_deleted when db is deleted
URL: https://github.com/apache/couchdb/pull/597#discussion_r127991059
##########
File path: src/couch/src/couch_file.erl
##########
@@ -272,14 +286,18 @@ deleted_filename(Original) ->
++ filename:extension(Original), [Y, Mon, D, H, Min, S])),
filename:rootname(Original) ++ Suffix.
-nuke_dir(RootDelDir, Dir) ->
+nuke_dir(RootDir, Dir) ->
+ nuke_dir(RootDir, Dir, []).
+nuke_dir(RootDelDir, Dir, Options) ->
EnableRecovery = config:get_boolean("couchdb",
"enable_database_recovery", false),
+ Context = couch_util:get_value(context, Options, compaction),
case EnableRecovery of
- true ->
- rename_file(Dir);
- false ->
- delete_dir(RootDelDir, Dir)
+ true when Context == delete ->
+ DbName = couch_util:get_value(db_name, Options),
+ rename_dir(RootDelDir, Dir, DbName);
+ true -> rename_file(Dir);
Review comment:
Ah, gotchya. For some reason I was thinking that was somewhere else but I
forgot what module i was reading.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services