[osg-users] Database pager and failed loading of PagedLOD's children

Robert Osfield robert.osfield at gmail.com
Mon Mar 5 00:21:09 PST 2018

HI Hatwig,

On 4 March 2018 at 21:02, Hartwig Wiesmann <hartwig.wiesmann at skywind.eu> wrote:
> the problem seems to be that the database pager (respectively the paged LOD) keeps trying to load the node that fails to load. To stop this I somehow have to tell the paged LOD to stop loading the children, or I have to modify the limits. But for doing so I need to know when a child fails to load.

This repeating of requests is part of the design of
PagedLOD/DatabasePager, the pager gets requested each time a LOD level
is selected as required by the cull traversal isn't available.  This
request happens every frame till that LOD level is loaded or isn't
required anymore. The later part is the key to why the mechanism is
used, the pager prunes requests that are no longer being requested so
that areas that you move out of view don't get paged in as they aren't
needed anymore.  This mechanism is crucial part of achieving the
lowest latency on loading tiles that are required for the view on
screen.  The faster moving the view is the more important it becomes -
think flight simulators etc.

For you usage case it sounds like your database isn't complete for
some reason, the current design+implementation doesn't have any
fallback mechanism for incomplete paged databases.  Nothing untoward
should happen in this case, all will happen is that the paging thread
will spend a bit of time trying and failing, so it'll lower
performance a bit but that's it. If the database is fixed while the
application is running - for instance a lost http connection is
re-established then finally the tiles can be loaded, so this scheme
will isn't 100% efficient in the failure case it does add resilience.

If it really is the case that a file request failure is permanent for
the life of the application then what you'd ideally want to do is have
the missing child entry into PageLOD be filled in be the child before
it.  This would then kill off any future requests for the missing
child.  Save for modifying the core OSG (PagedLOD/DatabasePager) to
add support this particular behaviour it wouldn't be straight forward,
but there is chance you might be able to use a combination of a
osgDB::Option object with a ReadFileCallback assigned to it such that
it uses the existing PagedLOD children as fallback.


More information about the osg-users mailing list