You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "Dylan Volz (JIRA)" <ji...@apache.org> on 2017/08/02 21:37:00 UTC

[jira] [Commented] (TC-494) Clone DS assignments button on Server times out

    [ https://issues.apache.org/jira/browse/TC-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111766#comment-16111766 ] 

Dylan Volz commented on TC-494:
-------------------------------

Initial investigation:
the update in question makes 9600+ separate db queries for the clone. 

the majority of these come from the 3 calls to very similar methods in a loop over affected DSes:
&UI::DeliveryService::header_rewrite
&UI::DeliveryService::regex_remap
&UI::DeliveryService::cacheurl

Since all 3 use an almost identical logic pattern a simple rewrite to make a combined method could  help lower the multiplier but I am not sure, without testing, how much this would move the needle. 
I think a more significant refactor may be needed to remove loops with db calls contained within and perhaps looking at changing our use of DBI to batch better.

The other issue surfaced by this ticket is that since hypnotoad kills the worker that is blocked on IO the server assignments are broken since the delete goes first, again a refactor for transactions could be needed. 
This all said this seems like a strong candidate for a method to rewrite in golang pending: https://github.com/apache/incubator-trafficcontrol/pull/729 .

> Clone DS assignments button on Server times out
> -----------------------------------------------
>
>                 Key: TC-494
>                 URL: https://issues.apache.org/jira/browse/TC-494
>             Project: Traffic Control
>          Issue Type: Bug
>          Components: Traffic Ops API
>    Affects Versions: 2.1.0
>            Reporter: Matt Mills
>            Assignee: Dylan Volz
>
> When you try to clone DS assignments in our current production environment, it will never complete the "clone" process, and gets timed out midway through, leaving you with a broken configuration on that server.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)