Commit Graph

313 Commits (11036d7bf471953ada9b877b8d9ce9de4b94dc5b)

Author SHA1 Message Date
Monty Brandenberg 11036d7bf4 Cleanup work. Use http constants for content-type and
accept headers in mesh and textures.  For texture metrics
reporting, use the AP_INVENTORY policy class which is
non-pipelined and pointing (usually) in the right direction.
Use a do-while(false) structure to manage common exit path
code in onCompleted() methods.  Identical to a 'goto' but
might amuse the pedantic.  Tuning on background fetch to
have it cycle faster.  This is experimental.  I suspect
with HTTP balancing in llcorehttp, we can do away with the
timers here.
2014-09-19 19:43:25 -04:00
Monty Brandenberg f71c6c745b Cleanup pass. Documentation. Get older llcorehttp-using
code to use utils for any LLSD interfaces.
2014-09-09 15:36:35 -04:00
Monty Brandenberg 0c20beda68 Pipelining work. Extend transfer timeout by the pipeline depth
as transfers can appear delayed with deep pipelining and more
requests in the pool.  Added bad HTTP status error (typically
getting a 0 back as HTTP status from libcurl) to the list of
retryable errors.  There's a response stream problem with libcurl
and pipelining that induces this problem.  Retrying helps but
may not be entirely safe.  Watch bug 1420 on the libcurl sourceforge
bug tracker.  Extend options of test/example program to include
un-ranged requests.  Document the excessive data transfer induced
when ranged requests are disabled.  This is an abnormal mode for
very rare users so we'll just eat that for now.
2014-09-04 16:57:44 -04:00
Monty Brandenberg 5dffe16aef Add 'HttpRangeRequestsDisable' debug setting to inhibit use of 'Range:' header.
Intended for users with bad networking gear or twitchy ISPs, if set to
True, forces plain GET requests to asset servers for textures and meshes.
This change kicked off a slight refactor in the mesh repository code which
made it resilient against unexpected 200's and responses not covering
the requested start range.  There's still too much data copying in the
Mesh code (always has been).  Would love to fix that and get rid of the
monolithic temp buffer.  Cleaned up white space damage caused by unnamed
linden who likes to drag his magical editor through code.
2014-08-11 14:38:47 -04:00
Monty Brandenberg 8fe0084108 Merge. Refresh from viewer-library-refresh after 3.7.13 release. 2014-08-04 21:35:57 +00:00
Monty Brandenberg 17da4cf57a Cleanup and tuning. Use a consistent index on some initialization
data so their isn't an opportunity for gaps over overruns (init_data).
Start some preliminary tweaking of policy class numbers.  It looks
like I can easily drop the default connection count to '4' and
still hit the throttles.  Did some experiments running pipeline
deeper which was mostly fine for textures but tended to slow
meshes.  Reason uncertain but a depth of '5' seems generally healthy
for mesh.  I had one run of 52.6S with a theoretical minimum of 51.2S.
That's as good as I've ever seen.
2014-06-27 17:25:39 -04:00
Monty Brandenberg 5cca78e718 First HTTP pipelining viewer. Enable pipelining for
GetTexture and GetMesh2 at a pipeline depth of 5.  Create
global debug option, HttpPipelining, to enable and disable
HTTP pipelining (defaults to true).  Tweak texture and
mesh low- and high-water request levels based on pipelining
status and depth.  Fixup texture console which was damaged
in a recent release.  Split logging of the no-request
HTTP error case into two cases:  one for missing URL in
HTTP request, one for HTTP request not created.  A refactor
in llcorehttp is coming:  I will be moving all libcurl-
using code into libcurl-specific modules.
2014-06-23 14:23:33 -04:00
Oz Linden e15002a11c merge changes for 3.7.9-release 2014-06-16 11:42:37 -04:00
Brad Payne (Vir Linden) 487ca1bad3 v-r -> s-e merge WIP 2014-05-14 17:50:59 -04:00
Brad Payne (Vir Linden) 7b9708a2e3 sunshine-external merge WIP 2014-05-13 10:02:26 -04:00
Oz Linden a98b4b6bee merge changes for 3.7.7-release 2014-05-07 11:09:04 -04:00
Oz Linden a5e56067c2 merge changes for 3.7.2-release 2014-03-03 15:36:34 -05:00
Brad Payne (Vir Linden) 895d52a399 merge viewer-release to sunshine-external 2014-02-25 13:25:40 -05:00
Richard Linden 80b4a4a1f5 merge with release 2014-02-24 18:45:59 -08:00
Monty Brandenberg b2fe32e572 SH-4667 HTTP Viewer reports network error instead of a misnamed joint on mesh upload
Tried to add consistent mesh upload retries in the HTTP work but a
combination of bad status choices in the upload service and the
one-shot nature of the upload capabilities means that status
information can be lost.  For now, retain the wonderful manual
retry logic.  At some future point, we might fix the services or
add application-level retry.
2014-01-09 15:18:54 -05:00
Monty Brandenberg ea1f6a6343 SH-4645 Viewer hangs on exit after cancelling a mesh upload.
Problem involved a 3-way livelock between the main, upload
and decomposition threads.  Viewer is shutting down but an
upload is in the 'generate hulls' state.  Main thread asks
upload request to discard and spins waiting for it to finish.
Upload thread is in generateHulls spinning waiting for the
decomposition thread to process a mesh request.  Decomposition
thread is sleeping waiting for main thread to deliver work
that upload thread has asked the decomposition thread to do.
2013-12-06 16:02:53 -05:00
Oz Linden 0031e9a97b merge up to 3.6.10-release; some of the storm-68 changes lost 2013-11-19 17:59:55 -05:00
Xiaohong Bao 555cf227ff trivial: fix several weird compiling errors. 2013-10-25 10:29:45 -06:00
Brad Payne (Vir Linden) 1f8b37e9ad merge 2013-10-16 11:52:43 -04:00
Richard Linden 80dfbbaacd merge from viewer-release 2013-10-08 11:59:24 -07:00
Monty Brandenberg 6f5790da38 Merge. Pull in viewer-release after 3.6.7 release. 2013-10-04 15:36:52 -04:00
Monty Brandenberg 56e2f11417 Up the transfer timeout of small meshes to 120S. This matches
the change made for MAINT-2347.  Large transfers are still
10 minutes.  Add/update to-do list and add some more info to
the FAQ in the Readme.
2013-09-27 17:22:31 -04:00
Monty Brandenberg 200bea5b41 SH-3690 SH-4505 Cleanup pass through code.
Start using DNS cache in legacy LLCurl code.  Go to 15 seconds
particularly as we're using threaded resolver at this point.
Documentation cleanup.  Add libcurl status checking and logging
for curl_easy_setopt() operations that fail.  Shouldn't happen
and we'll just continue anyway but there's info in the logs to
track these down now.  Cleaned up logic around FASTTIMER enable
defines used to evaluate pipeline stalls in main thread.
Removed long-standing thread race around caps strings and
URL construction.  Not a significant risk but refactoring the
code to get rid of them removed one huge eyesore.  It can be
made even slicker if desired (see notes).
2013-09-24 14:49:26 -04:00
Monty Brandenberg 2462162539 Move from std::queue to std::list which has better
behavior and swap() as well.  Should probably do this
for the other queues at some point.
2013-09-20 07:13:14 +00:00
Monty Brandenberg cbf7e90954 Used a c++11 feature unintentionally. Use a more
traditional swap-less object transfer.
2013-09-20 05:58:32 +00:00
Monty Brandenberg a232fa4d9f SH-4516 Fix a subset of thread races in llmeshrepository
Much earlier identified some thread races including two on mskininfoq
and mdecompositionq.  I actually hit one in testing the other day so
I'm fixing them now.  Put them under the mMutex lock and use the
mutex in such a way that main thread stalls are not added.
2013-09-19 19:20:31 -04:00
Brad Payne (Vir Linden) 25b078f968 log spam cleanup 2013-09-13 11:18:28 -04:00
Monty Brandenberg 99c60b83f1 SH-4489 New debug/dev settings for control over new mesh behavior
While giving myself a full project code review, found a bug in
the MeshUseGetMesh1 setting.  Mostly defaulted to old configuration
but used the GetMesh2 caps which would have been a huge DoS
resource sink.  Did some documentation maintenance as well while
I was in there.  More for the to-do list, etc.
2013-09-12 20:15:20 -04:00
Monty Brandenberg 622eae6555 SH-4490 More 'humane' error code presentation from llcorehttp callers
Added toTerseString() conversion on HttpStatus to generate a string
that's more descriptive than the hex value of the HttpStatus value
but still forms a short, searchable token (e.g. "Http_503" or
"Core_7").  Using this throughout the viewer now, no live cases
of toHex(), I believe.
2013-09-11 19:21:31 -04:00
Monty Brandenberg 2e8e40cf79 SH-4489 New debug/dev settings for control over new mesh behavior
Added 'MeshUseGetMesh1' and 'MeshUseHttpRetryAfter' debug settings
to control mesh transport behavior.  First forces the use of the
legacy mesh fetch style with high concurrency and connection churn.
The second, on by default, honors Retry-After values if they are
reasonable.  If off or unreasonable, internal delay times are used.
2013-09-11 18:00:55 -04:00
Monty Brandenberg 6a1f91fa3e SH-4478 Corrected/updated error handling for all retrieval operations.
In case of HTTP errors or parsing/processing errors, fail the
fetch request rather than do a retry spin.  Add logging for all
such failure paths.  Added a development/debug flag to create
probabilistic failures to test these modes and general error
recovery by higher-level layers.
2013-09-06 16:37:31 -04:00
Monty Brandenberg d706b57177 Document the fast timer testing apparatus a bit. 2013-08-29 13:04:05 -04:00
Monty Brandenberg af17c34d43 Merge. Pull in monty/viewer-drano-metrics. This will likely be
the last time and that repo can soon be abandoned (QA function
only).
2013-08-29 12:19:33 -04:00
Monty Brandenberg 42e3d55fb2 Add conditional LLFastTimer blocks to stallable main thread methods 2013-08-28 18:55:29 -04:00
Nyx Linden 5ae117aff6 merge with viewer-release 2013-08-16 19:31:16 -04:00
Monty Brandenberg f84a8104b8 SH-4410 Internal Documentation. Update and correct the mutex/data
lists to reflect current.  Describe the functional flow of things
for a single LOD request.  Put together to-do list for follow on
work.  Knock down the low/high water limits for GetMesh a bit,
100/200 too high, 75/150 should be better, vis-a-vis pathological
failures.
2013-08-15 19:00:43 -04:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Monty Brandenberg 8b78642a47 Create separate high/low water level limits for GetMesh and
GetMesh2 capabilities.  They should be independent now.
2013-08-07 21:31:41 -04:00
Monty Brandenberg 0d93247359 SH-4411 Thread/mutex rework between main and worker thread
Have the ::notifyLoadedMeshes() method doing correct locking
and stall avoidance at the same time.  This method now does
lazy mutex lock acquisition (trylock()) and if it fails on
either, it gives up and comes back later.  Capture the maximum
number of sequential failures and report this at the end of
the run in the log.  (So far, with big mesh regions, I've
only seen 1s and 2s.)  Locking/mutex requirements sorted in
other locations as well.  LLMutex gets trylock() method as
well as new LLMutexTrylock scoped locking class.  Clean up
some documentation, more to do.
2013-08-06 18:05:34 -04:00
Monty Brandenberg 43788d6120 Added some simple counters to the mesh repository code and then
added a Mesh status line to the texture fetch console.  Mesh is
often in competition with textures and so the mesh information
seems appropriate there.  Do get a nice feel for progress and
you definitely see when the throttles kick in.
2013-08-05 19:04:08 -04:00
Monty Brandenberg 549e20cf77 Change the setting for GetMesh2 meshes to Mesh2MaxConcurrentRequests.
While linking GetMesh2 to the old setting was simpler from a user
point-of-view, they really shouldn't be linked and the old one will
go away.  This one may be renamed to AssetMaxConcurrentRequests or
something similar if we get to the mesh/texture unification step.
2013-08-05 13:54:14 -04:00
Monty Brandenberg f3927c6ca2 SH-4371 Reduce 22mS inter-connection latency.
This really extended into the client-side request throttling.
Moved this from llmeshrepository (which doesn't really want
to do connection management) into llcorehttp.  It's now a
class option with configurable rate.  This still isn't the
right thing to do as it creates coupling between viewer
and services.  When we get to pipelining, this notion becomes
invalid.
2013-07-30 15:21:31 -04:00
Monty Brandenberg c9e64823c0 SH-4368 Adjust upload timeout parameters for slow networks.
Generally sorted the mesh timeout parameters for maximum
transport time (staying with default 30 for connect).  60S
for normal meshes, 600S for large.  Also documented default
option values in httpoptions.h.  Useful to have these.  In
the future, the timeouts might go into standard llsd options
where they can be tracked a bit more.
2013-07-29 12:42:27 -04:00
Monty Brandenberg b7f14a7b39 SH-4365 SH-4367 Conversion of mesh uploaders to llcorehttp.
With this checkin, legacy LLCurl is out of the mesh code.
Uploaders and responders are converted and functioning.  Logging
has been cleaned up throughout the code to use the macro form
with tag/subtag capability.  DEBUGS-level logging added for some
upload path milestones.  Better error information flow from
failed responses to viewer alert boxes but I'd really, really
like to do better here.  Mesh upload problems are completely
opaque as a user.  Minor cleanups (removed dead members,
method signatures tidied, less data conversion).  Could almost
call this complete, will likely have platform cleanups, however.
2013-07-25 18:36:08 -04:00
Xiaohong Bao 52f292c063 Merge 2013-07-23 23:07:16 -06:00
Monty Brandenberg 38b3da4a20 Merge. Refresh from viewer-release. 2013-07-18 18:43:58 -04:00
Monty Brandenberg 1bea6e50aa Merge. Refresh from viewer-release. 2013-07-18 17:27:31 -04:00
Monty Brandenberg d027db3cfc SH-4325 Viewer working mixed grid with GetMesh and GetMesh2 caps
Viewer modified for preference for GetMesh2 caps.  When found,
uses this cap and uses 1/4 the connection concurrency specified
by MeshMaxConcurrentRequests.  Also uses a modified calculation
for high/low water feeding into the llcorehttp library.
2013-07-18 15:14:55 -04:00
Monty Brandenberg a12d5d7c6d SH-4312 Clumsy configuration coordination between mesh and corehttp
Taught llappcorehttp to register signals on the settings values
that chagne behavior.  Have initialization and settings changes
sweep through settings and change them.  Dynamic changes are tried
but have no effect (produce a warning message) as dynamic settings
still aren't supported but the plumbing is now connected.  Just
need to change llcorehttp.  Bounced the 'teleport started' signal
around and it ended up back where it started with some cleanup.
This is making me less angry...
2013-06-28 20:08:29 -04:00
callum_linden bd41392b7e Merge with viewer-bear which was just merged with viewer-release 2013-06-28 13:36:41 -07:00