-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Correct defective return value in Posix::ls_with_sizes
#5037
Merged
Conversation
This file contains 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
PR #2671 introduced `ls_with_sizes`. There was a defect in `class Posix` where an empty directory return `nullopt` instead of an empty vector. This PR corrects that defect. I audited the original PR for possible related errors. This was the only one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. Left one comment.
KiterLuc
approved these changes
Jun 3, 2024
teo-tsirpanis
approved these changes
Jun 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks. This is worth back-porting IMO (but no need for a standalone patch release). |
KiterLuc
added a commit
that referenced
this pull request
Jun 6, 2024
…X. (#5043) [SC-23179](https://app.shortcut.com/tiledb-inc/story/23179) [SC-48851](https://app.shortcut.com/tiledb-inc/story/48851) [SC-48854](https://app.shortcut.com/tiledb-inc/story/48854) This PR updates the signature of `ls_with_sizes` in the `VFS` class and the specific VFS implementations[^1] to indicate errors by throwing exceptions instead of returning `Status`. On top of that, `Posix::ls_with_sizes` was updated to fail if `opendir` failed with an error code other than `ENOENT` (see also #5037 (comment)). Also in `Posix::ls_with_sizes`, the pointer returned by `opendir` was updated to be placed inside a smart pointer, making sure it gets freed. This caused errors in the `find_head_api_violations.py` script, which were fixed. [^1]: HDFS was not updated to minimize risk. --- TYPE: BUG DESC: Do not mask failures when listing a directory fails on POSIX. --------- Co-authored-by: Luc Rancourt <lucrancourt@gmail.com>
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
PR #2671 introduced
ls_with_sizes
. There was a defect inclass Posix
where an empty directory returnednullopt
instead of an empty vector. This PR corrects that defect.I audited the original PR for possible related errors. This was the only one.
[sc-48646]
TYPE: BUG
DESC: Correct defective return value in
Posix::ls_with_sizes