You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by James Peach <jp...@apache.org> on 2015/01/18 19:43:00 UTC

Re: [1/2] trafficserver git commit: TS-3303 tcpinfo: we can close the log file object multiple times

> On Jan 15, 2015, at 5:29 PM, zwoop@apache.org wrote:
> 
> 
[snip]
> diff --git a/plugins/tcpinfo/tcpinfo.cc b/plugins/tcpinfo/tcpinfo.cc
> index 481f553..1937eed 100644
> --- a/plugins/tcpinfo/tcpinfo.cc
> +++ b/plugins/tcpinfo/tcpinfo.cc
> @@ -171,12 +171,9 @@ log_tcp_info(Config * config, const char * event_name, TSHttpSsn ssnp)
>                      info.tcpi_rtt);
>   }
> 
> -  // It's really not clear how we should handle logging failures. It a failure transient
> -  // or persistent? Should we try to re-open the logs? How frequently should we do that?
>   if (ret != TS_SUCCESS) {
> -    TSError("[tcpinfo] log write failed, disabling logging");
> -    TSTextLogObjectDestroy(config->log);
> -    config->log = NULL;
> +      // ToDo: This could be due to a failure, or logs full. Should we consider
> +      // closing / reopening the log? If so, how often do we do that ?
>   }
> }

Yeh I think the original code was a bit aggressive here. A failing log write seems like a poor excuse to give up altogether. Do you know whether the log writing will recover from this failure?

J