[ 
https://issues.apache.org/jira/browse/TS-4694?focusedWorklogId=25982&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25982
 ]

ASF GitHub Bot logged work on TS-4694:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Jul/16 18:56
            Start Date: 25/Jul/16 18:56
    Worklog Time Spent: 10m 
      Work Description: Github user shinrich commented on a diff in the pull 
request:

    https://github.com/apache/trafficserver/pull/825#discussion_r72122764
  
    --- Diff: proxy/ProxyClientTransaction.h ---
    @@ -211,7 +211,11 @@ class ProxyClientTransaction : public VConnection
     
       virtual bool allow_half_open() const = 0;
     
    -  virtual const char *get_protocol_string() const = 0;
    +  virtual const char *
    --- End diff --
    
    I don't think adding a length argument makes much difference one way or the 
other.  I guess it would reduce the logging call site to once call.  But we are 
storing the protocol as a NULL terminated string, so we'd be doing the strlen 
in any case.


Issue Time Tracking
-------------------

    Worklog Id:     (was: 25982)
    Time Spent: 1h  (was: 50m)

> Some refactoring after SPDY is removed
> --------------------------------------
>
>                 Key: TS-4694
>                 URL: https://issues.apache.org/jira/browse/TS-4694
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Leif Hedstrom
>            Assignee: Susan Hinrichs
>             Fix For: 7.0.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> There's a place in the code with a comment about refactoring this once we 
> remove SPDY (see below). I'm filing this separates from TS-4311, because I'm 
> not sure what this refactoring entails. [~shinrich] had some ideas around 
> this code :).
> {code}
> void
> ProxyClientTransaction::new_transaction()
> {
>   ink_assert(current_reader == NULL);
>   // Defensive programming, make sure nothing persists across
>   // connection re-use
>   ink_release_assert(parent != NULL);
>   current_reader = HttpSM::allocate();
>   current_reader->init();
>   DebugHttpTxn("[%" PRId64 "] Starting transaction %d using sm [%" PRId64 
> "]", parent->connection_id(),
>                parent->get_transact_count(), current_reader->sm_id);
>   // This is a temporary hack until we get rid of SPDY and can use virutal 
> methods entirely
>   // to track protocol.
>   PluginIdentity *pi = dynamic_cast<PluginIdentity *>(this->get_netvc());
>   if (pi) {
>     current_reader->plugin_tag = pi->getPluginTag();
>     current_reader->plugin_id  = pi->getPluginId();
>   } else {
>     const char *protocol_str = this->get_protocol_string();
>     // We don't set the plugin_tag for http, though in future we should 
> probably log http as protocol
>     if (strlen(protocol_str) != 4 || strncmp("http", protocol_str, 4)) {
>       current_reader->plugin_tag = protocol_str;
>       // Since there is no more plugin, there is no plugin id for http/2
>       // We are copying along the plugin_tag as a standin for protocol name 
> for logging
>       // and to detect a case in HttpTransaction (TS-3954)
>     }
>   }
>   current_reader->attach_client_session(this, sm_reader);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to