-
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
server,discovery: Allow B to use any O in case none match maxPrice #2999
Conversation
Still kept the feature on the db as it had all the tests already implemented and could still be useful in the future. I can remove it if preferred though.
While this may not seem useful now since we just convert them to floats on the probability calculation, it will be useful later when comparing prices to max price.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2999 +/- ##
===================================================
+ Coverage 57.43773% 57.47485% +0.03712%
===================================================
Files 92 92
Lines 15697 15706 +9
===================================================
+ Hits 9016 9027 +11
+ Misses 6082 6079 -3
- Partials 599 600 +1
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.
LGTM. Added one comment, other than that, it looks good.
One thing to keep in mind is that there is one corner case that will work "worse". I think it should not prevent us from merging and deploying it, but something to mention for the sake of awareness.
So, when we send GetOrch
requests to all Os, we wait only 500ms for the reply. If no Os replies, then we increase this timeout to 1s. Then, to 2s, and so on.
So, in theory, it's possible that all Os that replies in 500ms will have price higher than max price, but the Os with price lower than max price will reply later. In result, we'll select an O with price higher than max price, while an O with price lower than max price exists.
What does this pull request do? Explain your changes. (required)
This is to allow broadcasters to use any Orchestrator in case their maxPrice configuration
is set to a too low number such that no Orchestrators offer that service.
This is a fallback strategy after implementing the feature that makes the price per pixel
dynamic based on an external currency. It mitigates the risk of the price quote changing
drastically and the maxPrice becoming automatically too low. When that happens, the B
is going to fallback to any O for a while until the Os update their own prices.
This is a re-implementation of #2985, doing it inside the selection algorithm itself so that
we still fallback to other Os in case there are a few Os with
price < maxPrice
but that stillcan't serve the segments (e.g. perf issues).
Specific updates (required)
discovery
that filtered Os by maxPriceHow did you test each of these updates (required)
./test.sh
Does this pull request close any open issues?
Implements ENG-1855
Checklist:
make
runs successfully./test.sh
pass