-
Notifications
You must be signed in to change notification settings - Fork 167
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
selection: Clear known sessions if none of them has good enough latency score #3086
base: master
Are you sure you want to change the base?
Conversation
…cy score Problem: We never cleaned the known sessions, even if all of them had too low latency score to use; example of what sometimes happens: 1) Broadcaster accumulated 8 known sessions, but all had too low latency score 2) Session refresh was not triggered because we had a lot of knows session in the pool 3) At the same time, we didn't have sessions in unknown session pool 4) Selection checked that it cannot use the known session and tried to select from unknown sessions (but the pool was empty or there were no sessions fulfilling the condition of max price or perf score)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3086 +/- ##
===================================================
- Coverage 57.41469% 57.39836% -0.01633%
===================================================
Files 92 92
Lines 15766 15767 +1
===================================================
- Hits 9052 9050 -2
- Misses 6111 6114 +3
Partials 603 603
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me on the code snippet that was changed, but FTR I'm not super familiar with that entire session management logic.
LGTM
return heap.Pop(s.knownSessions).(*BroadcastSession) | ||
// known session does not have good enough latency score, clear the heap and use unknown session | ||
s.knownSessions = &sessHeap{} | ||
return s.selectUnknownSession(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this repopulate the known sessions heap as well?
fix https://linear.app/livepeer/issue/ENG-2051/investigate-warnings-no-orchestrators-passed-max-price-filter
Problem: We never cleaned the known sessions, even if all of them had too low latency score to use; example of what sometimes happens: