datrs / hypercore

Secure, distributed, append-only log
https://docs.rs/hypercore
Apache License 2.0
332 stars 37 forks source link

Update remove_dir_all requirement from 0.5.2 to 0.6.0 #124

Closed dependabot-preview[bot] closed 4 years ago

dependabot-preview[bot] commented 4 years ago

Updates the requirements on remove_dir_all to permit the latest version.

Release notes

Sourced from remove_dir_all's releases.

v0.6.0

Introduction

Welcome to the 0.6 release of remove_dir_all! remove_dir_all is a fast and reliable std::fs::remove_dir_all implementation for Windows, for other platforms it simply re-exports std. This release brings a lot internal updates and improvements with a complete internal refactor, switching to the 2018 edition and moving to GitHub Actions for handling CI. You can update it simply by updating your Cargo.toml.

remove_dir_all = "0.6"

Removing Directories In Parallel

The biggest change in this release is a refactor of the current the serial implementation with a Rayon based parallel implementation that is substantially faster due to the Windows IO model.

On Windows it is not enough to just recursively remove the contents of a directory and then the directory itself. Deleting does not happen instantaneously, but is delayed by IO being completed in the fs stack. Further, typical Windows machines can handle many more concurrent IOs than a single threaded application is capable of submitting: the overlapped (async) calls available do not cover the operations needed to perform directory removal.

To work around this, we use a work stealing scheduler and submit deletions concurrently with directory scanning, and delete sibling directories in parallel. This allows the slight latency of STATUS_DELETE_PENDING to only have logarithmic effect: a very deep tree will pay wall clock time for that overhead per level as the tree traverse completes, but not for every interior not as a simple recursive deletion would result in.

Earlier versions of this crate moved the contents of the directory being deleted to become siblings of base_dir, which required write access to the parent directory under all circumstances; this is no longer required - though it may be re-instated if in-use files turn out to be handled very poorly with this new threaded implementation.

There is a single small race condition where external side effects may be left: when deleting a hard linked readonly file, the syscalls required are: open, set rw, unlink (SetFileDispositionDelete), and finally set ro. A crash or power failure could lead to the loss of the readonly bit on the hardlinked inode.

Thank you so much to @rbtcollins for working on this effort, and providing the updated implementation!

Changelog

Sourced from remove_dir_all's changelog.

0.5.2

  • Added support for aarch64-pc-windows-msvc.

0.5.1

  • Fixed deletion of readonly items.

0.5.0

  • Upgraded to winapi 0.3.
Commits


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

If all status checks pass Dependabot will automatically merge this pull request.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)