You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/02/18 15:48:01 UTC

[GitHub] [trafficserver] jrushford commented on pull request #7467: Parent Select Plugin

jrushford commented on pull request #7467:
URL: https://github.com/apache/trafficserver/pull/7467#issuecomment-781438393


   The parent_result->retry is set when the retry window on a marked down parent elapses.  In HttpTransact, if retry is true and the transaction is successful to the parent, HttpTransact will mark the parent up.  That’s the only way markParentUp is ever called.
   
   
   
   From: Robert O Butts <no...@github.com>
   Date: Tuesday, February 16, 2021 at 10:11 AM
   To: apache/trafficserver <tr...@noreply.github.com>
   Cc: Rushford, John <Jo...@cable.comcast.com>, Mention <me...@noreply.github.com>
   Subject: Re: [apache/trafficserver] Parent Select Plugin (#7467)
   
   @rob05c commented on this pull request.
   
   ________________________________
   
   In proxy/http/HttpTransact.cc<https://urldefense.com/v3/__https:/github.com/apache/trafficserver/pull/7467*discussion_r576991520__;Iw!!CQl3mcHX2A!UZlne5ZEj-rTs35tBbyWCwBIUiORa1xSvCjhLcH4yG6lTwkpduxv5WYD7WOeZFqpQUq9slA$>:
   
   > @@ -178,12 +178,22 @@ inline static void
   
    findParent(HttpTransact::State *s)
   
    {
   
      url_mapping *mp = s->url_map.getMapping();
   
   -
   
   -  if (mp && mp->strategy) {
   
   -    return mp->strategy->findNextHop(reinterpret_cast<TSHttpTxn>(s->state_machine));
   
   +  if (s->response_action.handled) {
   
   +    s->parent_result.hostname = s->response_action.action.hostname;
   
   +    s->parent_result.port     = s->response_action.action.port;
   
   +    s->parent_result.retry    = s->response_action.action.retry;
   
   The plugin needs to know, for markdown and other things. The core does know, it's tracked in parent_result.retry. I guess we could add code to set that independent of the response_action, but that code doesn't exist today, it was previously in the old parent path that's not taken for response_action/strategy. I'm not sure exactly where it'd have to be added.
   I'm also not 100% sure there isn't a use case where a plugin would want to set retry=false even though it is, to elicit certain behavior. It seems strange, but I'm not certain it isn't valid.
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/apache/trafficserver/pull/7467*discussion_r576991520__;Iw!!CQl3mcHX2A!UZlne5ZEj-rTs35tBbyWCwBIUiORa1xSvCjhLcH4yG6lTwkpduxv5WYD7WOeZFqpQUq9slA$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABCXE3TCFEWAE2NSBQSFM4TS7KRLPANCNFSM4W5RGSFQ__;!!CQl3mcHX2A!UZlne5ZEj-rTs35tBbyWCwBIUiORa1xSvCjhLcH4yG6lTwkpduxv5WYD7WOeZFqp0NewP1o$>.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org