Remove Exists Check from S3 Repository Deletes#40931
Remove Exists Check from S3 Repository Deletes#40931original-brownbear merged 2 commits intoelastic:masterfrom original-brownbear:always-force-delete
Conversation
original-brownbear
commented
Apr 7, 2019
- The check doesn't add much if anything practically, since the S3 repository is eventually consistent and we only log the non-existence of a blob anyway
- We don't do the check on writes for this very reason and documented it as such
- Removing the check saves one API call per single delete speeding up the deletion process and lowering costs
* The check doesn't add much if anything practically, since the S3 repository is eventually consistent and we only log the non-existence of a blob anyway * We don't do the check on writes for this very reason and documented it as such * Removing the check saves one API call per single delete speeding up the deletion process and lowering costs
|
Pinging @elastic/es-distributed |
| IOException ioe = null; | ||
| for (String blobName : blobNames) { | ||
| try { | ||
| deleteBlob(blobName); |
There was a problem hiding this comment.
Just saw this and figured I'd dry this up here, no need to have duplicate logic for suppressing that exception.
|
|
||
| @Override | ||
| public void testDeleteBlob() { | ||
| assumeFalse("not implemented because of S3's weak consistency model", true); |
There was a problem hiding this comment.
The whole point of the test disabled here is testing the existence check before delete. Since it's running against a mock S3 implementation, it's completely superfluous anyway.
There was a problem hiding this comment.
If you want to serve it for documentation purposes, you'd better give a different name. testDeleteFailsWithNoSuchFileException, for example.
andrershov
left a comment
There was a problem hiding this comment.
I've left one comment requesting test renaming. No need for the second pass.
|
|
||
| @Override | ||
| public void testDeleteBlob() { | ||
| assumeFalse("not implemented because of S3's weak consistency model", true); |
There was a problem hiding this comment.
If you want to serve it for documentation purposes, you'd better give a different name. testDeleteFailsWithNoSuchFileException, for example.
|
thanks @andrershov ! |
* The check doesn't add much if anything practically, since the S3 repository is eventually consistent and we only log the non-existence of a blob anyway * We don't do the check on writes for this very reason and documented it as such * Removing the check saves one API call per single delete speeding up the deletion process and lowering costs
…s-in-all-the-places * elastic/master: (70 commits) Remove experimental label froms script_score query (elastic#41572) [Ml-Dataframe] Update URLs in Data frame client java doc (elastic#41539) Reenable bwc Tests in master (elastic#41540) Fix search_as_you_type's sub-fields to pick their names from the full path of the root field (elastic#41541) Remove search analyzers from DocumentFieldMappers (elastic#41484) Update community client and integration docs (elastic#41513) Remove Version.V_6_x_x constants use in security (elastic#41185) Mute testDriverConfigurationWithSSLInURL Remove dedicated SSL network write buffer (elastic#41283) Disable max score optimization for queries with unbounded max scores (elastic#41361) [DOCS] Explicitly set section IDs for Asciidoctor migration (elastic#41547) [ML] add multi node integ tests for data frames (elastic#41508) [Docs] Fix common word repetitions (elastic#39703) [DOCS] Note TESTRESPONSE can't be used immediately after TESTSETUP (elastic#41542) Update configuring-ldap-realm.asciidoc (elastic#40427) Fixed very small typo in date (elastic#41398) Refactor GeoHashUtils (elastic#40869) Make 0 as invalid value for `min_children` in `has_child` query (elastic#41347) field_caps: adapt bwc version after backport (elastic#41427) Remove Exists Check from S3 Repository Deletes (elastic#40931) ...
* The check doesn't add much if anything practically, since the S3 repository is eventually consistent and we only log the non-existence of a blob anyway * We don't do the check on writes for this very reason and documented it as such * Removing the check saves one API call per single delete speeding up the deletion process and lowering costs
* The check doesn't add much if anything practically, since the S3 repository is eventually consistent and we only log the non-existence of a blob anyway * We don't do the check on writes for this very reason and documented it as such * Removing the check saves one API call per single delete speeding up the deletion process and lowering costs