GH-39718: [C++][FS][Azure] Remove StatusFromErrorResponse as it's not necessary#39719
Merged
felipecrv merged 3 commits intoapache:mainfrom Jan 22, 2024
Merged
GH-39718: [C++][FS][Azure] Remove StatusFromErrorResponse as it's not necessary#39719felipecrv merged 3 commits intoapache:mainfrom
felipecrv merged 3 commits intoapache:mainfrom
Conversation
22b0f4a to
b48b529
Compare
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 4fc2a70. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this pull request
Feb 19, 2024
…'s not necessary (apache#39719) ### Rationale for this change Only the "*IfExists" functions from the Azure SDK ever set `response.Value.Deleted` to `false` to indicate that a resource wasn't found and the request succeeded without deleting anything. It's better that we use the `Delete()` versions of these functions instead of `DeleteIfExists` and check the `ErrorCode` ourselves to return an appropriate `Status` instead of something generic. ### What changes are included in this PR? - Removing `StatusFromErrorResponse` - Comments explaining the error handling decisions - Addition of a boolean parameter to `DeleteDirOnFileSystem` that controls how it fails when the directory being deleted doesn't exist ### Are these changes tested? - Yes, by the existing tests in `azurefs_test.cc`. * Closes: apache#39718 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Only the "*IfExists" functions from the Azure SDK ever set
response.Value.Deletedtofalseto indicate that a resource wasn't found and the request succeeded without deleting anything.It's better that we use the
Delete()versions of these functions instead ofDeleteIfExistsand check theErrorCodeourselves to return an appropriateStatusinstead of something generic.What changes are included in this PR?
StatusFromErrorResponseDeleteDirOnFileSystemthat controls how it fails when the directory being deleted doesn't existAre these changes tested?
azurefs_test.cc.