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

feat: handle metric for peer connection failure #27

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

adklempner
Copy link
Collaborator

@adklempner adklempner commented Jul 15, 2024

Related to #21

@adklempner adklempner marked this pull request as ready for review August 2, 2024 05:36
statusVersion VARCHAR(31),
failureCount INTEGER NOT NULL,
failedPeerId VARCHAR(255) NOT NULL,
CONSTRAINT peerConnFailure_unique unique(timestamp, peerId, failedPeerId, failureCount)
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure about this index - the chance that the same peer will report the same failing peer with the same failure count is slim, but definitely not non-existent - any particular reason for this constraint?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Including the timestamp should make it unique enough imo. It's mostly to prevent obvious duplicates (like if for whatever reason the client reports the same exact data twice).

Copy link
Member

Choose a reason for hiding this comment

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

Huh, sorry, I missed the timestamp in there 🤦‍♂️

@adklempner adklempner merged commit dc7d3d2 into master Aug 3, 2024
3 checks passed
@adklempner adklempner deleted the feat/peer-conn-failure branch August 3, 2024 01:21
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.

3 participants