summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-04-10 11:43:48 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-04-10 11:43:48 -0400
commitf78da987913de659367b24e3aa0add2c570f8e1f (patch)
tree67dc4e3574ee28714f5ef1d65abe09d916b7609f /indra/newview/llviewertexture.cpp
parent2711ba44f69afa3ed1df9fefc0b1403b40f0ec35 (diff)
SH-4061 WIP - capture http status codes from requests, restrict SB fetch retries to 5xx errors
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rwxr-xr-xindra/newview/llviewertexture.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index a157600cc9..7a1afb1238 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1760,7 +1760,8 @@ bool LLViewerFetchedTexture::updateFetch()
if (mRawImage.notNull()) sRawCount--;
if (mAuxRawImage.notNull()) sAuxCount--;
- bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mRawImage, mAuxRawImage);
+ bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mRawImage, mAuxRawImage,
+ mLastHttpGetStatus);
if (mRawImage.notNull()) sRawCount++;
if (mAuxRawImage.notNull()) sAuxCount++;
if (finished)
@@ -1825,14 +1826,25 @@ bool LLViewerFetchedTexture::updateFetch()
// We finished but received no data
if (current_discard < 0)
{
- const S32 MAX_FETCH_FAILURE = 1;
+ const S32 MAX_FETCH_FAILURE = 3;
mFetchFailureCount++;
- llwarns << "Fetch failure for " << mID << " failure count " << mFetchFailureCount << llendl;
- if (getFTType() != FTT_SERVER_BAKE || mFetchFailureCount >= MAX_FETCH_FAILURE)
+ llwarns << "Fetch failure for " << mID << " failure count " << mFetchFailureCount
+ << " status " << mLastHttpGetStatus.toHex() << llendl;
+ // Will retry server-bake textures under a limited set of circumstances.
+ if (getFTType() == FTT_SERVER_BAKE &&
+ mLastHttpGetStatus.isHttpStatus() &&
+ mLastHttpGetStatus.mType >= 500 &&
+ mLastHttpGetStatus.mType <= 599 && // Only retry 5xx failures.
+ mFetchFailureCount < MAX_FETCH_FAILURE)
+ {
+ llwarns << "Will retry fetch" << llendl;
+ }
+ else // Otherwise, assume the image is missing.
{
llwarns << "!mIsFetching, setting as missing, decode_priority " << decode_priority
<< " mRawDiscardLevel " << mRawDiscardLevel
<< " current_discard " << current_discard
+ << " stats " << mLastHttpGetStatus.toHex()
<< llendl;
setIsMissingAsset();
desired_discard = -1;