Skip to content
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

Add explicit model control test for Azure storage #3002

Merged
merged 5 commits into from
Jun 12, 2021

Conversation

CoderHam
Copy link
Contributor

@CoderHam CoderHam commented Jun 10, 2021

Fix case errno is 0 but the blob_property.valid() returns false. It appears errno is the correct way to check for errors based on the azure sdk sample.

deadeyegoodwin
deadeyegoodwin previously approved these changes Jun 10, 2021
tanmayv25
tanmayv25 previously approved these changes Jun 11, 2021
@@ -916,7 +916,7 @@ ASFileSystem::FileModificationTime(const std::string& path, int64_t* mtime_ns)
RETURN_IF_ERROR(ParsePath(path, &container, &object_path));

auto blobProperty = bc.get_blob_property(container, object_path);
if (!blobProperty.valid()) {
if (errno != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very strange for a C++ API to use errno...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what I thought as well. Additionally there are some cases where the valid is set to false even when errno is set to 0. While I was not able to reproduce such a case this is what the caused the error that the user was seeing in issue 2966

@CoderHam CoderHam merged commit 4d17fdb into main Jun 12, 2021
@CoderHam CoderHam deleted the hemantj-azure-explicit branch June 12, 2021 13:46
CoderHam added a commit that referenced this pull request Jun 12, 2021
* Add explicit model control test for Azure storage

* Update copyright

* Fix incorrectly detected failure when getting blob property
- for cases where errno is set to 0 but blob_property.valid() = false

* Update copyright

* Improve verbose error logging for azure storage FS
CoderHam added a commit that referenced this pull request Jun 14, 2021
* Add explicit model control test for Azure storage

* Update copyright

* Fix incorrectly detected failure when getting blob property
- for cases where errno is set to 0 but blob_property.valid() = false

* Update copyright

* Improve verbose error logging for azure storage FS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants