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

s3_client: add keys to log messages #17666

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

andrwng
Copy link
Contributor

@andrwng andrwng commented Apr 4, 2024

I noticed in some clusters that some NotFound errors show up a lot, and it's hard to tell whether they're alarming or not without more context.

2024-04-04 23:15:41,069 [shard 0:au  ] s3 - s3_client.cc:866 - S3 DeleteObject request failed: Not Found [X-GUploader-UploadID: ABPtcPo1Yr9tl-T0lj12Bu-qfbQN8GJVz9KSjvNVfHQef8LQmrwLIoGBvteJdNLTQRqrE0fbVcA];[Content-Type: application/xml; charset=UTF-8];[Content-Length: 289];[Vary: Origin];[Date: Thu, 04 Apr 2024 23:15:41 GMT];[Expires: Thu, 04 Apr 2024 23:15:41 GMT];[Cache-Control: private, max-age=0];[Server: UploadServer];",

This commit adds the object key to several existing (mostly) warn and error level logs.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x

Release Notes

  • none

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Apr 5, 2024

dotnwat
dotnwat previously approved these changes Apr 6, 2024
dotnwat
dotnwat previously approved these changes Apr 9, 2024
@andrwng
Copy link
Contributor Author

andrwng commented Apr 10, 2024

Pushed a new fix for the test

An upcoming commit will log the key on error in the s3 client. As is,
delete_objects() would pass in a dummy key to be logged, whose lifetime
would not last to logging time. This commit makes the method co_await to
ensure the variable lasts for the duration of the call.
I noticed in some clusters that some NotFound errors show up a lot, and
it's hard to tell whether they're alarming or not without more context.

```
2024-04-04 23:15:41,069 [shard 0:au  ] s3 - s3_client.cc:866 - S3 DeleteObject request failed: Not Found [X-GUploader-UploadID: ABPtcPo1Yr9tl-T0lj12Bu-qfbQN8GJVz9KSjvNVfHQef8LQmrwLIoGBvteJdNLTQRqrE0fbVcA];[Content-Type: application/xml; charset=UTF-8];[Content-Length: 289];[Vary: Origin];[Date: Thu, 04 Apr 2024 23:15:41 GMT];[Expires: Thu, 04 Apr 2024 23:15:41 GMT];[Cache-Control: private, max-age=0];[Server: UploadServer];",
```

This commit adds the object key to several existing (mostly) warn and
error level logs.
@andrwng
Copy link
Contributor Author

andrwng commented Apr 10, 2024

Per discussion with Noah, changed approaches to co_await instead of using a static variable.

@andrwng andrwng merged commit 40435d0 into redpanda-data:dev Apr 10, 2024
17 checks passed
nvartolomei added a commit to nvartolomei/redpanda that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants