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

Track dropped candidates #710

Merged
merged 3 commits into from
Apr 26, 2024
Merged

Track dropped candidates #710

merged 3 commits into from
Apr 26, 2024

Conversation

AndreiEres
Copy link
Collaborator

After we change our method of candidate tracking, we faced a bug with increased backing counts. Was found that we don't remove from tracker candidates that were dropped on session change.

This PR fixes state pruning for dropped candidates. These candidates are visible only in CLI mode, nothing goes to Prometheus. Also added visual only event for candidates pending availability.

@AndreiEres AndreiEres requested review from alexggh and sandreim April 24, 2024 15:15
.filter(|candidate| !candidate.is_included())
.collect();
// We have more than one backed candidate
// because of session change or availability core timeout
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we drop all candidates pending availability when new session is detected rather than rely on this artifact of having more than one after session change ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a good question.
We could've cleaned them on session change, but we still have to keep in mind that a candidate may be dropped after a core timeout.
Do you think we should separate that cases?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Generally it is not a good idea to build logic on top of side effects. If this fixes it quickly, yeah let's do it, but let's properly handle session changes and otherwise the only reason you could have more than 1 candidate is elastic scaling.

@AndreiEres AndreiEres enabled auto-merge (squash) April 26, 2024 12:11
@AndreiEres AndreiEres merged commit 054f998 into master Apr 26, 2024
6 checks passed
@AndreiEres AndreiEres deleted the AndreiEres/drop-candidates branch April 26, 2024 14:23
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