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

Update CRT HeadersError::HeaderNotFound to include header name #1205

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dannycjones
Copy link
Contributor

We recently saw an error in #1199 where "Header not found" was emitted, but its really unclear what header was missing.

2024-12-12T18:33:59.379478Z  WARN flush{req=1609 ino=2 fh=1 pid=29257 name="testfile_100M.bin"}: mountpoint_s3::fuse: flush failed: put failed: put request failed: Client error: Internal S3 client error: Header not found

This change updates the HeadersError::HeaderNotFound enum variant to contain a copy of the header name, such that error messages can emit it for debugging purposes.

I think it would make more sense to have all the headers we're interested in statically defined somewhere, such that we could include a static reference to the header and avoid allocating for an error message. However, we don't expect there to be any performance regression introduced by this change. We could take an action to move to static values later.

Does this change impact existing behavior?

Header not found errors will now include the header name when printing the error message.

The enum variant changes meaning any code using the enum may be impacted.

Does this change need a changelog entry?

Not for Mountpoint itself. I have added a change log entry to mountpoint-s3-crt since it is a breaking API change.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@dannycjones dannycjones added the performance PRs to run benchmarks on label Dec 20, 2024
@dannycjones dannycjones requested a review from passaro December 20, 2024 17:37
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
@dannycjones dannycjones force-pushed the add-header-name-to-header-not-found-crt branch from 08c23cb to 61a5878 Compare December 20, 2024 22:01
@dannycjones dannycjones temporarily deployed to PR integration tests December 20, 2024 22:01 — with GitHub Actions Inactive
@dannycjones dannycjones deployed to PR benchmarks December 20, 2024 22:01 — with GitHub Actions Active
@dannycjones dannycjones temporarily deployed to PR integration tests December 20, 2024 22:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests December 20, 2024 22:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests December 20, 2024 22:01 — with GitHub Actions Inactive
@dannycjones dannycjones deployed to PR integration tests December 20, 2024 22:01 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance PRs to run benchmarks on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant