-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
FSBlobContainer leniently truncates #15579
Labels
Comments
This was referenced Dec 21, 2015
+100 |
abeyad
pushed a commit
to abeyad/elasticsearch
that referenced
this issue
Apr 20, 2016
This commit contains the following: 1. Clarifies the behavior that must be adhered to by any implementors of the BlobContainer interface. This is done through expanded Javadocs. 2. BlobContainer#writeBlob cannot overwrite an already existing blob. It will now throw an exception if trying to write to a pre-existing file. Closes elastic#15579 Closes elastic#15580
abeyad
pushed a commit
to abeyad/elasticsearch
that referenced
this issue
Aug 2, 2016
conform with the requirements of the writeBlob method by throwing a FileAlreadyExistsException if attempting to write to a blob that already exists. This change means implementations of BlobContainer should never overwrite blobs - to overwrite a blob, it must first be deleted and then can be written again. Closes elastic#15579
abeyad
pushed a commit
that referenced
this issue
Aug 2, 2016
conform with the requirements of the writeBlob method by throwing a FileAlreadyExistsException if attempting to write to a blob that already exists. This change means implementations of BlobContainer should never overwrite blobs - to overwrite a blob, it must first be deleted and then can be written again. Closes #15579
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The two write methods are defined like this:
Passing nothing to Files.newOutputStream will truncate the output file if its already there:
Can we please pass
StandardOpenOptions.CREATE_NEW
so that silent data truncation never happens?The text was updated successfully, but these errors were encountered: