Dirk Krause wrote:
> Hi,
> 
> I did a little test with a fresh OpenSim installation (yes, thanks for
> the installer!),
> to get a grip on what I learned from Melanie yesterday.
> 
> I wrote a little python script to help me monitor these tables:
>   inventoryStore/inventoryItems
>   assetStorage/assets
> http://pastebin.com/mc9e6574 , be warned: ugly code.
> 
> I started OpenSim and logged in a 'Test User' with the SL viewer.
> 
> (Just to mention it - first time log in in as test users creates
> 4 'blank' entries in assets.)
> 
> The inventoryItems table was initially empty.
> 
> Now I rezzed a cube and renamed it to 'p1'.
> inventoryStore/inventoryItems was still empty.
> To my surprise no new entry shows up in assetStorage/assets.

Rezzing an object in a region does not involve the creation of any new assets - 
all the data is stored in unserialized 
form in columns in the region database.

> 
> Picking up the cube ('take') created an entry named 'p1' in the
> inventory and in the asset table.

The asset you see is the serialized object pointed to by your inventory item 
entry.

> 
> Now I renamed the cube in Test Users inventory to 'p2'.
> The name in inventoryStore/inventoryItems changes to 'p2'.
> The entry in assetStorage/assets stays 'p1'. As mentioned on the list
> before,
> the asset name is useless, since the user only sees the name in the
> inventory.

Exactly.

> 
> Now I deleted 'p2' in my inventory - 'p2's parentfolderID changes to
> 'Trash'.
> Now I emptied the trash - the inventory table is empty again, which is
> fine,
> but here's the big one:
>    the assetStorage/assets still holds the reference to 'p1'.

Exactly.

> 
> Just to make sure I shut down the simulator and opened it again, and it
> was still there.
> 
> Now, doesn't that mean, that the database increases over time with no
> hope to find
> these assets that actually should be gone? or is there some magic
> purging that happens,
> and that I missed?

The problem is that you may have given that item to somebody else.  Giving an 
item does not make an asset copy, it just 
makes an inventory item copy (both inventory items still point towards the same 
asset).

So you may delete your item, but we don't know if the asset referenced by that 
item lives on in someone else's inventory 
(or in an object inventory).  So we can't delete the underlying asset.

> 
> This would mean that any grid runs into a severe problem over time.

Yep :).  On a standalone one could implement some cleanup scheme which checks 
everything to see if an asset is still 
referenced, and deletes that asset if it is not.

In grid mode this is a much more difficult problem since references are 
scattered across many different regions servers. 
  The situation is even worse if you are running a grid where not all of them 
are guaranteed to be connected.

> 
> Best,
>   Dirk/Bart
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev@lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
> 


-- 
justincc
Justin Clark-Casey
http://justincc.wordpress.com
_______________________________________________
Opensim-dev mailing list
Opensim-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-dev

Reply via email to