[Opensim-dev] On Mantis #1370 (avatar persistence)

Sean Dague sean at dague.net
Mon Jun 9 15:56:30 UTC 2008


On Fri, Jun 06, 2008 at 04:07:18PM +0900, Johan Berntsson wrote:
> Hi,
> 
> We have discussed #1370 and looked at the code and we are a bit 
> confused. Currently these events seems to occur when a client logs onto 
> a region:
> 
> Region receives UseCircuitCode packet, and calls GetAppearance(). 
> GetAppearance needs InventoryFolder which has not yet been created, and 
> fails every time.
> 
> A bit later the region receives a CompletedAgentMovement packet, and 
> calls GetInventory(). It then calls GetAppearance() once again. If 
> GetInventory succeeded, then GetAppearance() also succeeds, and avatar 
> persistence works.
> 
> Here are some ideas/questions:
> 
> 1. GetInventory() is asynchronous but GetAppearance() doesn't check if 
> it has been completed or not. This probably explains why some people 
> experience #1370 while it works for others (the unlucky guys have slow 
> computers/networks).

Ok, that's a good catch.  There was a random sleep in the code before,
which might have been trying to alleviate this (which is the bad
approach).  It would be good to come up with a good way of delaying the
response here.

> 2. GetAppearance() is using InventoryFolder to get asset IDs even though 
> the inventory asset IDs are available in 'avatarappearance' in the DB. 
> The information seems to be duplicated. Can't we use the DB IDs 
> directly? In that case we don't need to synchronize GetInventory() and 
> GetAppearance().

This was added to deal with the "Can't find your clothes" issue.  It
turns out that we were missing an update on appearance editing that
meant the asset ids were out of date.  It seemed more logical to look it
up via inventory.  If we can track down where we were loosing that
update, we could rely on the asset fields again.

> 3. One of the GetAppearance() calls seem redundant, but which? Should we 
> call GetApperance after UseCircuitCode or CompletedAgentMovement?
> 
> We think it would work if we removed the GetInventory() dependency in 
> GetAppearance() and the second call to GetApperance(), but we are 
> reluctant to commit the change since we don't understand the design 
> completely. Hope you can enlighten us.

Honestly, I don't understand the design completely either. :)  And worse
than that, confirming that it works on Standalone + Grid / accross
multiple dbs tends to show that one approach doesn't work in one of
those environments.  At this point, any help in getting this pulled
together would be appreciated.

    -Sean

-- 
__________________________________________________________________

Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group
http://dague.net                                 http://mhvlug.org

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080609/7e425611/attachment-0001.pgp>


More information about the Opensim-dev mailing list