Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fs): add timeouts to atomic operations #3534

Merged
merged 7 commits into from Oct 16, 2018
Merged

Conversation

Enishowk
Copy link
Contributor

@Enishowk Enishowk commented Oct 15, 2018

Fixes #3467

Check list

Check items when done or if not relevant

  • PR reference the relevant issue (e.g. Fixes #007)
  • if UI changes, a screenshot has been added to the PR
  • CHANGELOG:
    • enhancement/bug fix entry added
    • list of packages to release updated (${name} v${new version})
  • documentation updated

Process

  1. create a PR as soon as possible
  2. mark it as WiP: (Work in Progress) if not ready to be merged
  3. when you want a review, add a reviewer
  4. if necessary, update your PR, and re- add a reviewer

@julien-f julien-f changed the title feat(#3467): Add timeout error in fs feat(fs): add timeouts to atomic operations Oct 15, 2018
@@ -121,7 +127,7 @@ export default class RemoteHandlerAbstract {
newPath: string,
{ checksum = false }: Object = {}
) {
let p = this._rename(oldPath, newPath)
let p = timeout.call(this._rename(oldPath, newPath), 10000)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use the constant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p is redefined when we have checksum : L.132

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use DEFAULT_TIMEOUT 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. ;)

Copy link
Member

@julien-f julien-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add timeouts on createReadStream and createOutputStream as well

Copy link
Member

@julien-f julien-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add @xen-orchestra/fs v0.4.0 to the list of packages to release in the changelog.

CHANGELOG.md Outdated
@@ -24,6 +24,7 @@
- xo-server-usage-report v0.7.0
- xo-server v5.29.0
- xo-web v5.29.0
- @xen-orchestra/fs v0.4.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move it on top because it's a dependency of other packages to help with the (in order) release process 🙂

@julien-f julien-f merged commit 61db026 into master Oct 16, 2018
@julien-f julien-f deleted the feat-timeout-fs branch October 16, 2018 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fs] Add sensible timeouts for every operations
2 participants