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

liu xiaolu lulurun at gmail.com
Mon Jun 9 16:39:41 UTC 2008


My personal suggestion:

For getting apprearance data:
remove the 2nd "if" condition in "TryGetAvatarAppearance".
>>> if ((profile != null) && (profile.RootFolder != null))  --> if (profile
!= null)
remove "SetAppearanceAssets" in "TryGetAvatarAppearance".
>>> // SetAppearanceAssets(profile, ref appearance);

For storing would be almost the same.

>This was added to deal with the "Can't find your clothes" issue.
It seems that this is the reason why "RootFolder" information is needed.
I think it is not necessary (or should not) to check assetID's avaliability
by using C# code.
It is a tired, buggy way to go, even you can make "getinventory"
synchronous.
Both of the MySQL, MSSQL have the native support of "FOREGIN KEY
constaints".
RDBMS should handle such task for us.

THEN,
in that case, ... Table "inventoryfolders", "inventoryitems",
"avatarappearance" should be always in the save DB. ...
THEN,
probably, getapearance should be moved to inventoryservice :>

It is very strange that you get appearance from use server and then check
them by using the information from inventory server. these things
can(should) be done in one request.


2008/6/10 Sean Dague <sean at dague.net>:

> 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.
> __________________________________________________________________
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFITVKuSamXem9TdyYRAitjAKCIpuwIj6rq/fDNnpqSb+wDi7pW4ACdGTj0
> nIcCQxwyrbmV48JpNHhJpDM=
> =HEnD
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>


-- 
Liu Xiaolu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080610/e0a99547/attachment-0001.html>


More information about the Opensim-dev mailing list