Add 'internal'/'external' token to DEBUG retry message so that dev/QA

Mon, 19 Aug 2013 12:01:26 -0400

author
Monty Brandenberg <monty@lindenlab.com>
date
Mon, 19 Aug 2013 12:01:26 -0400
changeset 40708
88761ed1b6bc
parent 40707
6173865727da
child 40710
fe3e11b6b50c

Add 'internal'/'external' token to DEBUG retry message so that dev/QA
can know exactly where a retry value was sourced.

indra/llcorehttp/_httppolicy.cpp file | annotate | diff | revisions
     1.1 --- a/indra/llcorehttp/_httppolicy.cpp	Fri Aug 16 18:07:49 2013 -0400
     1.2 +++ b/indra/llcorehttp/_httppolicy.cpp	Mon Aug 19 12:01:26 2013 -0400
     1.3 @@ -153,14 +153,16 @@
     1.4  		};
     1.5  	static const int delta_max(int(LL_ARRAY_SIZE(retry_deltas)) - 1);
     1.6  	static const HttpStatus error_503(503);
     1.7 -	
     1.8 +
     1.9  	const HttpTime now(totalTime());
    1.10  	const int policy_class(op->mReqPolicy);
    1.11  	HttpTime delta(retry_deltas[llclamp(op->mPolicyRetries, 0, delta_max)]);
    1.12 +	bool external_delta(false);
    1.13  
    1.14  	if (op->mReplyRetryAfter > 0 && op->mReplyRetryAfter < 30)
    1.15  	{
    1.16  		delta = op->mReplyRetryAfter * U64L(1000000);
    1.17 +		external_delta = true;
    1.18  	}
    1.19  	op->mPolicyRetryAt = now + delta;
    1.20  	++op->mPolicyRetries;
    1.21 @@ -171,7 +173,8 @@
    1.22  	LL_DEBUGS("CoreHttp") << "HTTP request " << static_cast<HttpHandle>(op)
    1.23  						  << " retry " << op->mPolicyRetries
    1.24  						  << " scheduled in " << (delta / HttpTime(1000))
    1.25 -						  << " mS.  Status:  " << op->mStatus.toHex()
    1.26 +						  << " mS (" << (external_delta ? "external" : "internal")
    1.27 +						  << ").  Status:  " << op->mStatus.toHex()
    1.28  						  << LL_ENDL;
    1.29  	if (op->mTracing > HTTP_TRACE_OFF)
    1.30  	{

mercurial