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

Make PeerCooling more robust #4748

Merged
merged 4 commits into from
Dec 14, 2023
Merged

Make PeerCooling more robust #4748

merged 4 commits into from
Dec 14, 2023

Conversation

coot
Copy link
Contributor

@coot coot commented Dec 12, 2023

Description

This PR fixes a bug which causes the outbound governor to loose track of an outbound connection. This can prevent outbound governor to notice a demotion, and thus prevent it to re-establish a connection. This can happen only in specific conditions, with rather low frequency, however high enough to be observed by some SPOs.

outbound-governor: made asyncDemotion recognition more robust

The Outbound Governor might not see PeerCooling state, since STM doesn't guarantee that every update is visible. asyncDemotion has to be robust enough to accept PeerCold without seeing PeerCooling before.

peer-state-actions: made closePeerConnection more robust

Carefully update the state to PeerCooling so that we don't overwrite
PeerCold, ref

Checklist

  • Branch
    • Updated changelog files.
    • Commit sequence broadly makes sense
    • Commits have useful messages
    • The documentation has been properly updated
    • New tests are added if needed and existing tests are updated
    • If serialization changes, user-facing consequences (e.g. replay from genesis) are confirmed to be intentional.
  • Pull Request
    • Self-reviewed the diff
    • Useful pull request description at least containing the following information:
      • What does this PR change?
      • Why these changes were needed?
      • How does this affect downstream repositories and/or end-users?
      • Which ticket does this PR close (if any)? If it does, is it linked?
    • Reviewer requested

The Outbound Governor might not see `PeerCooling`:
* since STM doesn't guarantee that every update is visible.
  `asyncDemotion` has to be
  robust enough to accept that `PeerCold` without seeing `PeerCooling`
  before;
* or there was an error while demoting a hot peer, in which we
  transition to `PeerCold` directly.
Carefully update the state to `PeerCooling` so that we don't overwrite
`PeerCold`.
karknu added a commit to karknu/cardano-node that referenced this pull request Dec 13, 2023
@coot coot marked this pull request as ready for review December 14, 2023 13:29
@coot coot requested a review from bolt12 December 14, 2023 13:29
@coot coot added the bug Something isn't working label Dec 14, 2023
@coot coot enabled auto-merge December 14, 2023 18:31
@coot coot added this pull request to the merge queue Dec 14, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 14, 2023
@coot coot added this pull request to the merge queue Dec 14, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 14, 2023
@coot coot added this pull request to the merge queue Dec 14, 2023
Merged via the queue into master with commit b467291 Dec 14, 2023
8 of 11 checks passed
@coot coot deleted the coot/peer-cooling branch December 14, 2023 20:08
coot added a commit that referenced this pull request Dec 15, 2023
@coot coot added the outbound-governor Issues / PRs related to outbound-governor label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working outbound-governor Issues / PRs related to outbound-governor
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants