Skip to content

Add missing log for failed GC record unmarshalling in purgeStore() - #3273

Merged
MarcoPolo merged 1 commit into
libp2p:masterfrom
vipocenka:fix/update
Apr 21, 2025
Merged

MarcoPolo merged 1 commit into
libp2p:masterfrom
vipocenka:fix/update

Conversation

@vipocenka

Copy link
Copy Markdown
Contributor

This PR replaces a // TODO comment with an actual log statement in the purgeStore() method of the dsAddrBookGc:

Change summary:

  • Added a log.Warnf when proto.Unmarshal fails during garbage collection:
    log.Warnf("failed to unmarshal record during GC purge: key=%s, err=%v", result.Key, err)

@MarcoPolo MarcoPolo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks :) are you using the pstoreds package by any chance?

@vipocenka

Copy link
Copy Markdown
Contributor Author

@MarcoPolo
I'm not using the pstoreds package myself β€” I just came across the TODO while reviewing the code and thought it would be helpful to replace it with a proper log statement.

@MarcoPolo
MarcoPolo merged commit effdc65 into libp2p:master Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants