SH-4489 New debug/dev settings for control over new mesh behavior

Wed, 11 Sep 2013 18:00:55 -0400

author
Monty Brandenberg <monty@lindenlab.com>
date
Wed, 11 Sep 2013 18:00:55 -0400
changeset 40721
e9454aeb9ec3
parent 40720
2ebe6a72a502
child 40722
779b223e385c

SH-4489 New debug/dev settings for control over new mesh behavior
Added 'MeshUseGetMesh1' and 'MeshUseHttpRetryAfter' debug settings
to control mesh transport behavior. First forces the use of the
legacy mesh fetch style with high concurrency and connection churn.
The second, on by default, honors Retry-After values if they are
reasonable. If off or unreasonable, internal delay times are used.

indra/llcorehttp/httpoptions.h file | annotate | diff | revisions
indra/newview/app_settings/settings.xml file | annotate | diff | revisions
indra/newview/llmeshrepository.cpp file | annotate | diff | revisions
     1.1 --- a/indra/llcorehttp/httpoptions.h	Fri Sep 06 16:37:31 2013 -0400
     1.2 +++ b/indra/llcorehttp/httpoptions.h	Wed Sep 11 18:00:55 2013 -0400
     1.3 @@ -103,7 +103,7 @@
     1.4  			return mRetries;
     1.5  		}
     1.6  
     1.7 -	// Default:  false
     1.8 +	// Default:  true
     1.9  	void				setUseRetryAfter(bool use_retry);
    1.10  	bool				getUseRetryAfter() const
    1.11  		{
     2.1 --- a/indra/newview/app_settings/settings.xml	Fri Sep 06 16:37:31 2013 -0400
     2.2 +++ b/indra/newview/app_settings/settings.xml	Wed Sep 11 18:00:55 2013 -0400
     2.3 @@ -9980,6 +9980,28 @@
     2.4      <key>Value</key>
     2.5      <integer>32</integer>
     2.6    </map>
     2.7 +  <key>MeshUseHttpRetryAfter</key>
     2.8 +  <map>
     2.9 +    <key>Comment</key>
    2.10 +    <string>If TRUE, use Retry-After response headers when rescheduling a mesh request that fails with an HTTP 503 status.</string>
    2.11 +    <key>Persist</key>
    2.12 +    <integer>1</integer>
    2.13 +    <key>Type</key>
    2.14 +    <string>Boolean</string>
    2.15 +    <key>Value</key>
    2.16 +    <boolean>1</boolean>
    2.17 +  </map>
    2.18 +  <key>MeshUseGetMesh1</key>
    2.19 +  <map>
    2.20 +    <key>Comment</key>
    2.21 +    <string>If TRUE, use the legacy GetMesh capability for mesh download requests.</string>
    2.22 +    <key>Persist</key>
    2.23 +    <integer>1</integer>
    2.24 +    <key>Type</key>
    2.25 +    <string>Boolean</string>
    2.26 +    <key>Value</key>
    2.27 +    <boolean>0</boolean>
    2.28 +  </map>
    2.29     <key>RunMultipleThreads</key>
    2.30      <map>
    2.31        <key>Comment</key>
     3.1 --- a/indra/newview/llmeshrepository.cpp	Fri Sep 06 16:37:31 2013 -0400
     3.2 +++ b/indra/newview/llmeshrepository.cpp	Wed Sep 11 18:00:55 2013 -0400
     3.3 @@ -743,8 +743,10 @@
     3.4  	mHttpRequest = new LLCore::HttpRequest;
     3.5  	mHttpOptions = new LLCore::HttpOptions;
     3.6  	mHttpOptions->setTransferTimeout(SMALL_MESH_XFER_TIMEOUT);
     3.7 +	mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
     3.8  	mHttpLargeOptions = new LLCore::HttpOptions;
     3.9  	mHttpLargeOptions->setTransferTimeout(LARGE_MESH_XFER_TIMEOUT);
    3.10 +	mHttpLargeOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
    3.11  	mHttpHeaders = new LLCore::HttpHeaders;
    3.12  	mHttpHeaders->append("Accept", "application/vnd.ll.mesh");
    3.13  	mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_MESH2);
    3.14 @@ -1828,6 +1830,7 @@
    3.15  	mHttpRequest = new LLCore::HttpRequest;
    3.16  	mHttpOptions = new LLCore::HttpOptions;
    3.17  	mHttpOptions->setTransferTimeout(mMeshUploadTimeOut);
    3.18 +	mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
    3.19  	mHttpHeaders = new LLCore::HttpHeaders;
    3.20  	mHttpHeaders->append("Content-Type", "application/llsd+xml");
    3.21  	mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS);
    3.22 @@ -3211,13 +3214,16 @@
    3.23  			
    3.24  			if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived())
    3.25  			{
    3.26 +				const bool use_v1(gSavedSettings.getBOOL("MeshUseGetMesh1"));
    3.27 +
    3.28  				region_name = gAgent.getRegion()->getName();
    3.29  				mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh");
    3.30  				mGetMesh2Capability = gAgent.getRegion()->getCapability("GetMesh2");
    3.31 -				mGetMeshVersion = mGetMesh2Capability.empty() ? 1 : 2;
    3.32 +				mGetMeshVersion = (mGetMesh2Capability.empty() || use_v1) ? 1 : 2;
    3.33  				LL_DEBUGS(LOG_MESH) << "Retrieving caps for region '" << region_name
    3.34  									<< "', GetMesh2:  " << mGetMesh2Capability
    3.35  									<< ", GetMesh:  " << mGetMeshCapability
    3.36 +									<< ", using version:  " << mGetMeshVersion
    3.37  									<< LL_ENDL;
    3.38  			}
    3.39  		}

mercurial