incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adamlofts <...@git.apache.org>
Subject couchdb pull request: Ensure that nuke_dir properly deletes the folder
Date Tue, 25 Sep 2012 13:51:39 GMT
GitHub user adamlofts opened a pull request:

    https://github.com/apache/couchdb/pull/33

    Ensure that nuke_dir properly deletes the folder

    nuke_dir() was calling couch_file:delete() which expects to be passed a file. This pull
request splits out a delete_rename() function and adds nuke_dir_sync() to actually remove
the folder once it is renamed.
    
    There is also a small performance improvement by deleting the folder asynchronously after
it has been renamed.
    
    The second commit reuses the nuke_dir_sync() function to clean up the .delete folder on
startup because it can now contain deleted folders.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/adamlofts/couchdb tidy-delete-dir

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb/pull/33.patch

----
commit 58853ae3bd92e837e357991f359cf8673db5b012
Author: Adam Lofts <Adam.Lofts@gmail.com>
Date:   2012-09-24T04:37:33-07:00

    Change nuke_dir to rename the directory and then delete asynchronously
    
    couch_file:delete does not expect to be passed a directory and
    was not properly removing the directory from the .delete folder.

commit 1e7ce16f665c1d1335a8cad2504d94c25a58c0dc
Author: Adam Lofts <Adam.Lofts@gmail.com>
Date:   2012-09-24T04:59:22-07:00

    Use nuke_dir_sync to clean the .delete directory
    
    This is because folders are also deleted by moving to the deleted directory
    so also need to be removed.

----


Mime
View raw message