All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

VWR-24889: When a bake texture upload fails, retry instead of giving up.

Review Request #152 - Created Feb. 17, 2011 and submitted

Thickbrick Sleaford Reviewers
viewer
VWR-24889
None viewer-development
When a bake upload fails, the viewer doesn't retry it, and subsequently doesn't send a AgentSetAppearance message. This can happen without the user being aware, leaving the avatar looking good on their screen, but not updated to the same outfit on other people's screens. The avatar will remain in that state until the user does something that causes a rebake (manually rebake or change outfit.) The solution here is to retry the upload after a small delay.

What this diff changes: when a full-res upload fails, retry to upload it after a 5s delay, up to 5 times (in case the cap is available, last attempt is via the old asset store.) Also, some clearer log messages. This implements an old *FIX: comment:
    // *FIX: retry upload after n seconds, asset server could be busy

This isn't needed for low res uploads, because they don't block subsequent full-res uploads (mNeedsUpload isn't set to FALSE in LLTexLayerSetBuffer::doUpload in low-res uploads.)
Attempted outfit changes using a problematic connection (not recently used outfits to avoid using cached bakes). Looked for "Baked full res texture upload for <region name> failed" log messages, observed the subsequent retries and successful upload for that region. Observed that eventually the fully-baked avatar is visible to other users.
Review request changed
Updated (June 13, 2011, 2:39 p.m.)
- Fixed typo in comment ("intermediary").
- Changed file-scope constants to static const.
- At Oz's suggestion (in email), delays are now exponential. Oz suggested leaving this to hammer the server indefinitely, but I feel more comfortable with a limit of 7 attempts. The first attempt is immediate, and 6 retries are done with delays: 2s, 4s, ... 64s. The delays sum up to 126 seconds.
Ship it!
Posted (June 15, 2011, 7:57 a.m.)