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

Revise blob sidecar not found log #13571

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Feb 1, 2024

Revised log messaging to clarify scenarios where a node, despite having the blob sidecar locally, encounters an error serving it to a peer due to the sidecar not being found in the database

@terencechain terencechain requested a review from a team as a code owner February 1, 2024 16:31
@terencechain terencechain changed the title Update blob sidecar not found log Revise blob sidecar not found log Feb 1, 2024
@terencechain terencechain added the Ready For Review A pull request ready for code review label Feb 1, 2024
@@ -80,7 +80,7 @@ func (s *Service) blobSidecarByRootRPCHandler(ctx context.Context, msg interface
sc, err := s.cfg.blobStorage.Get(root, idx)
if err != nil {
if db.IsNotFound(err) {
log.WithError(err).Debugf("BlobSidecar not found in db, root=%x, index=%d", root, idx)
log.WithError(err).Debugf("Serving blob sidecar request, not found in db, root=%x, index=%d", root, idx)
Copy link
Contributor

Choose a reason for hiding this comment

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

If the goal is to make it clear that this is untrusted input, we could make that a little more clear like "Peer requested blob sidecar by root which was not found in db".

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Thanks!

@terencechain terencechain force-pushed the update-blobsidecar-not-found-log branch from 92466e6 to 426e2df Compare February 1, 2024 16:47
prestonvanloon
prestonvanloon previously approved these changes Feb 1, 2024
@@ -80,7 +80,7 @@ func (s *Service) blobSidecarByRootRPCHandler(ctx context.Context, msg interface
sc, err := s.cfg.blobStorage.Get(root, idx)
if err != nil {
if db.IsNotFound(err) {
log.WithError(err).Debugf("BlobSidecar not found in db, root=%x, index=%d", root, idx)
log.WithError(err).Debugf("Peer requested blob sidecar by root which was not found in db, root=%x, index=%d", root, idx)
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: This would be better to remove the templating and use fields. Easier to collect and measure this log

@terencechain terencechain added this pull request to the merge queue Feb 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 1, 2024
@terencechain terencechain added this pull request to the merge queue Feb 1, 2024
Merged via the queue into develop with commit 52af63f Feb 1, 2024
17 checks passed
@terencechain terencechain deleted the update-blobsidecar-not-found-log branch February 1, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants