summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-01-11 11:36:11 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-01-11 11:36:11 -0500
commit0f753a530b914370c7c89c198ee335833ac3e6a1 (patch)
treefbfd6a3bfe6b839bb57743bf11262817ab1a50dd /indra
parent6479e0a59b0ace04dcd1529804af90dcbe2accaa (diff)
SH-3639 WIP - cleaned up some diagnostics and added fault injection ability. Disabled inventory retries for now.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/logcontrol.xml2
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llappearancemgr.cpp43
-rwxr-xr-xindra/newview/llviewertexture.cpp2
-rwxr-xr-xindra/newview/llvoavatarself.cpp2
-rw-r--r--indra/newview/llvovolume.cpp3
6 files changed, 53 insertions, 10 deletions
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 64122bbb6c..1259039010 100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -42,8 +42,8 @@
</array>
<key>tags</key>
<array>
- <!-- sample entry for debugging specific items
<string>Avatar</string>
+ <!-- sample entry for debugging specific items
<string>Voice</string>
-->
</array>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4b93cef57f..32b2920279 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4326,6 +4326,17 @@
<key>Value</key>
<real>0.0</real>
</map>
+ <key>InventoryDebugSimulateLateOpRate</key>
+ <map>
+ <key>Comment</key>
+ <string>Rate at which we simulate late-completing copy/link requests in some operations</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.0</real>
+ </map>
<key>InventoryDisplayInbox</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index bf35382b7a..7edba842b8 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -49,6 +49,7 @@
#include "llvoavatarself.h"
#include "llviewerregion.h"
#include "llwearablelist.h"
+#include "llsdutil.h"
std::string self_av_string()
{
@@ -160,6 +161,11 @@ LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string
// to requests.
const F32 DEFAULT_RETRY_AFTER_INTERVAL = 300.0;
+// Given the current back-end problems, retrying is causing too many
+// duplicate items. Bump this back to 2 once they are resolved (or can
+// leave at 0 if the operations become actually reliable).
+const S32 DEFAULT_MAX_RETRIES = 0;
+
class LLCallAfterInventoryBatchMgr: public LLEventTimer
{
public:
@@ -168,7 +174,7 @@ public:
nullary_func_t on_completion_func,
nullary_func_t on_failure_func = no_op,
F32 retry_after = DEFAULT_RETRY_AFTER_INTERVAL,
- S32 max_retries = 2
+ S32 max_retries = DEFAULT_MAX_RETRIES
):
mDstCatID(dst_cat_id),
mTrackingPhase(phase_name),
@@ -228,6 +234,13 @@ public:
void onOp(const LLUUID& src_id, const LLUUID& dst_id, LLTimer timestamp)
{
+ if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateLateOpRate"))
+ {
+ llwarns << "Simulating late operation by punting handling to later" << llendl;
+ doAfterInterval(boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,src_id,dst_id,timestamp),
+ mRetryAfter);
+ return;
+ }
mPendingRequests--;
F32 elapsed = timestamp.getElapsedTimeF32();
LL_DEBUGS("Avatar") << "op done, src_id " << src_id << " dst_id " << dst_id << " after " << elapsed << " seconds" << llendl;
@@ -371,7 +384,7 @@ public:
nullary_func_t on_completion_func,
nullary_func_t on_failure_func = no_op,
F32 retry_after = DEFAULT_RETRY_AFTER_INTERVAL,
- S32 max_retries = 2
+ S32 max_retries = DEFAULT_MAX_RETRIES
):
LLCallAfterInventoryBatchMgr(dst_cat_id, phase_name, on_completion_func, on_failure_func, retry_after, max_retries)
{
@@ -409,7 +422,7 @@ public:
nullary_func_t on_completion_func,
nullary_func_t on_failure_func = no_op,
F32 retry_after = DEFAULT_RETRY_AFTER_INTERVAL,
- S32 max_retries = 2
+ S32 max_retries = DEFAULT_MAX_RETRIES
):
LLCallAfterInventoryBatchMgr(dst_cat_id, phase_name, on_completion_func, on_failure_func, retry_after, max_retries)
{
@@ -1653,6 +1666,7 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
continue;
if (item->getIsLinkType())
{
+#if 0
if (keep_items && keep_items->find(item) != LLInventoryModel::item_array_t::FAIL)
{
llinfos << "preserved item" << llendl;
@@ -1661,7 +1675,10 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
{
gInventory.purgeObject(item->getUUID());
}
+#else
+ gInventory.purgeObject(item->getUUID());
}
+#endif
}
}
@@ -2981,13 +2998,27 @@ public:
// Successful completion.
/* virtual */ void result(const LLSD& content)
{
- llinfos << "request OK" << llendl;
+ LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL;
+ if (content["success"].asBoolean())
+ {
+ LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
+ }
+ else
+ {
+ onFailure(200);
+ }
}
// Error
- /*virtual*/ void error(U32 status, const std::string& reason)
+ /*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
llwarns << "appearance update request failed, status: " << status << " reason: " << reason << llendl;
+ LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL;
+ onFailure(status);
+ }
+
+ void onFailure(U32 status)
+ {
F32 seconds_to_wait;
if (mRetryPolicy->shouldRetry(status,seconds_to_wait))
{
@@ -3001,7 +3032,7 @@ public:
{
llwarns << "giving up after too many retries" << llendl;
}
- }
+ }
LLPointer<LLHTTPRetryPolicy> mRetryPolicy;
};
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 5763fe307e..6c773368d3 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1161,7 +1161,7 @@ void LLViewerFetchedTexture::destroyTexture()
return ;
}
- LL_DEBUGS("Avatar") << mID << llendl;
+ //LL_DEBUGS("Avatar") << mID << llendl;
destroyGLTexture() ;
mFullyLoaded = FALSE ;
}
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 8f118f5110..9b43db7087 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2256,7 +2256,7 @@ void LLVOAvatarSelf::sendAppearanceChangeMetrics()
if (S32_MAX == ++report_sequence)
report_sequence = 0;
- LL_DEBUGS("Avatar") << avString() << "message: " << ll_pretty_print_sd(msg) << LL_ENDL;
+// LL_DEBUGS("Avatar") << avString() << "message: " << ll_pretty_print_sd(msg) << LL_ENDL;
std::string caps_url;
if (getRegion())
{
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 9078cce932..3831a13f41 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1146,9 +1146,10 @@ void LLVOVolume::sculpt()
}
else if (current_discard > MAX_DISCARD_LEVEL)
{
+#if 0
llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
<< " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl;
-
+#endif
// corrupted volume... don't update the sculpty
return;
}