From 769bf46a3f4df2ee0dc9167d687a89eaf7547daa Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 7 Dec 2022 09:50:02 -0500
Subject: SL-14399: Ditch overflow queue LLViewerAssetStorage::mCoroWaitList.

mCoroWaitList was introduced to prevent an assertion failure crash:
LLCoprocedureManager never expects to fill LLCoprocedurePool::mPendingCoprocs
queue. The queue limit was arbitrarily set to 4096 some years ago, but in
practice LLViewerAssetStorage can post way more requests than that.

LLViewerAssetStorage checked whether the target LLCoprocedureManager pool's
queue looked close to full, and if so posted the pending request to its
mCoroWaitList instead. But then it had to override the base LLAssetStorage
method checkForTimeouts() to continually check whether pending tasks could be
moved from mCoroWaitList to LLCoprocedureManager.

A simpler solution is to enlarge LLCorpocedureManager::DEFAULT_QUEUE_SIZE, the
upper limit on mPendingCoprocs. Since mCoroWaitList was an unlimited queue,
making DEFAULT_QUEUE_SIZE "very large" does not increase the risk of runaway
memory consumption.
---
 indra/newview/llviewerassetstorage.h | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'indra/newview/llviewerassetstorage.h')

diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h
index 0965a17ce1..c3719d0918 100644
--- a/indra/newview/llviewerassetstorage.h
+++ b/indra/newview/llviewerassetstorage.h
@@ -65,8 +65,6 @@ public:
 		bool user_waiting=FALSE,
 		F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) override;
 
-    void checkForTimeouts() override;
-
 protected:
 	void _queueDataRequest(const LLUUID& uuid,
 						   LLAssetType::EType type,
@@ -118,8 +116,6 @@ protected:
         LLGetAssetCallback mCallback;
         void *mUserData;
     };
-    typedef std::list<CoroWaitList> wait_list_t;
-    wait_list_t mCoroWaitList;
 
     std::string mViewerAssetUrl;
     S32 mCountRequests;
-- 
cgit v1.2.3