SH-4667 HTTP Viewer reports network error instead of a misnamed joint on mesh upload

Thu, 09 Jan 2014 15:18:54 -0500

author
Monty Brandenberg <monty@lindenlab.com>
date
Thu, 09 Jan 2014 15:18:54 -0500
changeset 40741
67f869e108d0
parent 40740
ba1f758296e6
child 40742
cb80fdfec947

SH-4667 HTTP Viewer reports network error instead of a misnamed joint on mesh upload
Tried to add consistent mesh upload retries in the HTTP work but a
combination of bad status choices in the upload service and the
one-shot nature of the upload capabilities means that status
information can be lost. For now, retain the wonderful manual
retry logic. At some future point, we might fix the services or
add application-level retry.

indra/newview/llmeshrepository.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llmeshrepository.cpp	Mon Dec 09 15:29:21 2013 -0500
     1.2 +++ b/indra/newview/llmeshrepository.cpp	Thu Jan 09 15:18:54 2014 -0500
     1.3 @@ -5,7 +5,7 @@
     1.4   *
     1.5   * $LicenseInfo:firstyear=2005&license=viewerlgpl$
     1.6   * Second Life Viewer Source Code
     1.7 - * Copyright (C) 2010-2013, Linden Research, Inc.
     1.8 + * Copyright (C) 2010-2014, Linden Research, Inc.
     1.9   * 
    1.10   * This library is free software; you can redistribute it and/or
    1.11   * modify it under the terms of the GNU Lesser General Public
    1.12 @@ -359,6 +359,16 @@
    1.13  const long SMALL_MESH_XFER_TIMEOUT = 120L;				// Seconds to complete xfer, small mesh downloads
    1.14  const long LARGE_MESH_XFER_TIMEOUT = 600L;				// Seconds to complete xfer, large downloads
    1.15  
    1.16 +// Would normally like to retry on uploads as some
    1.17 +// retryable failures would be recoverable.  Unfortunately,
    1.18 +// the mesh service is using 500 (retryable) rather than
    1.19 +// 400/bad request (permanent) for a bad payload and
    1.20 +// retrying that just leads to revocation of the one-shot
    1.21 +// cap which then produces a 404 on retry destroying some
    1.22 +// (occasionally) useful error information.  We'll leave
    1.23 +// upload retries to the user as in the past.  SH-4667.
    1.24 +const long UPLOAD_RETRY_LIMIT = 0L;
    1.25 +
    1.26  // Maximum mesh version to support.  Three least significant digits are reserved for the minor version, 
    1.27  // with major version changes indicating a format change that is not backwards compatible and should not
    1.28  // be parsed by viewers that don't specifically support that version. For example, if the integer "1" is 
    1.29 @@ -1883,6 +1893,7 @@
    1.30  	mHttpOptions = new LLCore::HttpOptions;
    1.31  	mHttpOptions->setTransferTimeout(mMeshUploadTimeOut);
    1.32  	mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
    1.33 +	mHttpOptions->setRetries(UPLOAD_RETRY_LIMIT);
    1.34  	mHttpHeaders = new LLCore::HttpHeaders;
    1.35  	mHttpHeaders->append("Content-Type", "application/llsd+xml");
    1.36  	mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS);

mercurial