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

Create icommand irmdir #14

Closed
rskarbez opened this issue Apr 26, 2017 · 3 comments
Closed

Create icommand irmdir #14

rskarbez opened this issue Apr 26, 2017 · 3 comments

Comments

@rskarbez
Copy link
Contributor

Functionality would be the same as Unix rmdir.

Requested in irods/irods#3117.

@trel
Copy link
Member

trel commented May 9, 2017

please cherry-pick to 4-2-stable

@trel trel reopened this May 9, 2017
rskarbez added a commit to irods/irods that referenced this issue May 10, 2017
rskarbez added a commit that referenced this issue May 10, 2017
@mcast
Copy link

mcast commented May 10, 2017

Thanks for implementing it. I skimmed the code (possibly misunderstanding it in the process) and wondered, does it give the same safety guarantees as the POSIX equivalent?

  1. check the collection is empty - yes.
  2. equivalent to irm -r, wrapped as irmdir

This is fine until,

  1. without getting an exclusive lock on the collection,
  2. check the collection is empty - yes.
  3. some other client sneaks in and writes a file
  4. equivalent to irm -r, wrapped as irmdir
  5. disappointment and data loss?

Could you make the safety guarantee, or lack of, explicit in the irmdir -h text please?

@rskarbez rskarbez reopened this May 10, 2017
@rskarbez
Copy link
Contributor Author

Thanks for checking this; I hadn't considered that potential case. I will certainly update the help text, and will look into what it would take to make the equivalent safety guarantees as the POSIX equivalent.

rskarbez added a commit to irods/irods that referenced this issue May 11, 2017
rskarbez added a commit to irods/irods that referenced this issue May 11, 2017
xu-hao pushed a commit to xu-hao/temporary-irods-mod that referenced this issue Jun 8, 2017
xu-hao pushed a commit to xu-hao/temporary-irods-mod that referenced this issue Jun 8, 2017
@trel trel closed this as completed Jul 6, 2017
xu-hao pushed a commit to xu-hao/temporary-irods-mod that referenced this issue Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants