diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2022-06-07 11:42:51 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2022-06-07 12:17:15 -0700 |
commit | 7908ae701f245f6c15602b23b2073f6c0fe3fdb8 (patch) | |
tree | a7623d7967114764919729d9ac6d77a8c870693a /indra/newview/lltexturefetch.cpp | |
parent | a562f6fe51a527a66884a0919d217ebb42270cc0 (diff) |
SL-17489: Fix map tile log spam and resulting excessive invalid texture requests.
This was affecting map tiles that the agent is not allowed to see (HTTP error: 403 forbidden). The URLs of these map tile requests were then getting cleared, so when these map tiles were re-requested (up to 10 times per second, from LLViewerFetchedTexture::updateFetch), the request would use the wrong URL and get a 404.
Stay in DONE state if there is no new work to do, reducing unneeded requests for textures while leaving open the possibility to re-request a texture at different resolution. Alternatively, we could introduce a new FAILED state here. The current DONE state has nuance, and can either mean "texture loading failed" or "texture successfully loaded at a certain LOD." And a 4xx error is generally irrecoverable. Will strongly consider a FAILED state.
Also, don't clear the map URL, so that any future network requests for the map textures request the correct resource.
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 873c9f3519..5eeecb33f2 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1671,7 +1671,7 @@ bool LLTextureFetchWorker::doWork(S32 param) << LL_ENDL; } - if (mFTType != FTT_SERVER_BAKE) + if (mFTType != FTT_SERVER_BAKE && mFTType != FTT_MAP_TILE) { mUrl.clear(); } @@ -2695,6 +2695,11 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const return false; // need to wait for previous aborted request to complete } worker->lockWorkMutex(); // +Mw + if (worker->mState == LLTextureFetchWorker::DONE && worker->mDesiredSize == llmax(desired_size, TEXTURE_CACHE_ENTRY_SIZE) && worker->mDesiredDiscard == desired_discard) { + worker->unlockWorkMutex(); // -Mw + + return false; // similar request has failed or is in a transitional state + } worker->mActiveCount++; worker->mNeedsAux = needs_aux; worker->setImagePriority(priority); |