-
-
Notifications
You must be signed in to change notification settings - Fork 305
Clarification on Storage.Delete #310
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
Comments
That's a good point.
I dunno. What do you think, should it return an error in that second case? |
I'd be fine with either, though semantically your proposed error essentially boils down to "something I expected to exist doesn't, so inform the caller". So maybe it should return an error in both cases? idk it's not quite the same thing. In terms of my implementation, what would you guess would be the best behavior to have for now to maximize compatibility with the current release of certmagic? |
I'd have to think on it more. (I'll be busy with a conference presentation for the next week though.) For now, I'd say just return no error, even if the parent dir(s) does/do not exist, but I want to revisit this thinking at some point. |
I think that might be an issue if the underlying storage is an object store, say S3. I don't think S3 will tell you about |
S3 is not a suitable storage medium anyway, as it does not meet the atomicity requirements of the API. |
@mholt would you mind providing a simple example of where S3 would break atomicity for this? I'm currently reading Kleppmann's book and this would be a nice real world example for me. |
@anderspitman S3 does not have an atomic operation such as "create this file only if it does not exist," e.g. |
What is your question?
Under what conditions should Delete return an error? This and this seem to contradict each other.
The text was updated successfully, but these errors were encountered: