-
Notifications
You must be signed in to change notification settings - Fork 344
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
Reduce the number of DB requests made in ValidateServerCapabilities() #5212
Labels
good first issue
first-time committers will find this easy to resolve
improvement
The functionality exists but it could be improved in some way.
performance
impacts/improves/measures performance
Traffic Ops
related to Traffic Ops
Comments
rawlinp
added
Traffic Ops
related to Traffic Ops
good first issue
first-time committers will find this easy to resolve
performance
impacts/improves/measures performance
improvement
The functionality exists but it could be improved in some way.
labels
Oct 28, 2020
@rawlinp I would like to take this up. Could you please assign this to me? |
@rawlinp Just want to check that I am going in the right direction before I start on this.
|
@RaviTezu that sounds like a reasonable idea. This query should be a good example for you to modify for Lines 348 to 360 in b99eda5
|
rawlinp
added a commit
to rawlinp/trafficcontrol
that referenced
this issue
Jul 30, 2021
Also, fix some cases where it was possible to delete/unassign all `EDGE`-type servers from a delivery service if there were also `ORG`-type servers assigned. Closes: apache#6069 Closes: apache#5212
5 tasks
zrhoffman
pushed a commit
that referenced
this issue
Aug 3, 2021
…d DS (#6077) * Prevent unassigning all ONLINE ORG servers from active MSO-enabled DS Also, fix some cases where it was possible to delete/unassign all `EDGE`-type servers from a delivery service if there were also `ORG`-type servers assigned. Closes: #6069 Closes: #5212 * Fix v2 and v3 TO API integration tests * Address review comments Simplify queries, remove double-space in alert message, and change if to else-if.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
first-time committers will find this easy to resolve
improvement
The functionality exists but it could be improved in some way.
performance
impacts/improves/measures performance
Traffic Ops
related to Traffic Ops
I'm submitting a ...
Traffic Control components affected ...
Current behavior:
TO currently makes a DB request per server in the
ValidateServerCapabilities()
function:trafficcontrol/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
Line 541 in b99eda5
New behavior:
Instead of making a DB request per server, the function should make a single DB request to get data for all the servers at once, then perform the validation. This will make it much faster to assign a delivery service to large numbers of servers at a time.
Minimal reproduction of the problem with instructions:
Assign a delivery service with required capabilities to a large number of servers with those capabilities at a time.
The text was updated successfully, but these errors were encountered: