From 69e3b5fb4014ef900b129ebde49325f1b074e773 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 11 Apr 2023 01:33:24 +0300 Subject: SL-19533 Orphans plus additional logging --- indra/newview/llinventorymodelbackgroundfetch.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview/llinventorymodelbackgroundfetch.cpp') diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index e988f949e2..35b9442966 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -461,10 +461,13 @@ void LLInventoryModelBackgroundFetch::incrFetchFolderCount(S32 fetching) void ais_simple_folder_callback(const LLUUID& inv_id) { LLInventoryModelBackgroundFetch::instance().incrFetchFolderCount(-1); - LLViewerInventoryCategory * cat(gInventory.getCategory(inv_id)); - if (cat) + if (inv_id.notNull()) // null normally means a failure, but is an expected response for orphans { - cat->setFetching(LLViewerInventoryCategory::FETCH_NONE); + LLViewerInventoryCategory* cat(gInventory.getCategory(inv_id)); + if (cat) + { + cat->setFetching(LLViewerInventoryCategory::FETCH_NONE); + } } } @@ -580,6 +583,11 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() mFetchItemQueue.pop_front(); curent_time = LLTimer::getTotalSeconds(); } + + LL_DEBUGS(LOG_INV , "AIS3") << "Total active fetches: " << mFetchCount + << ", scheduled fodler fetches: " << (S32)mFetchFolderQueue.size() + << ", scheduled item fetches: " << (S32)mFetchItemQueue.size() + << LL_ENDL; if (isFolderFetchProcessingComplete() && mFolderFetchActive) { @@ -600,7 +608,8 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc if (cat_id.isNull()) { // Lost and found - AISAPI::FetchCategoryChildren("lstndfnd", true, ais_simple_folder_callback); + // Should it actually be recursive? + AISAPI::FetchOrphans(ais_simple_folder_callback); incrFetchFolderCount(1); } else -- cgit v1.2.3