[Opensim-dev] Request for comments on a patch to resolve race conditions with grid inventory server interactions
Justin Clark-Casey
jjustincc at googlemail.com
Sat Dec 15 01:41:14 UTC 2007
http://opensimulator.org/mantis/view.php?id=190 is a bug where inventory
item deletion in grid mode would sometimes fail and cause the user's
inventory to become permanently unavailable.
I believe I've traced the cause to the use of async rest posters to
invoke the inventory functions. Because item movement to Trash involves
first an item delete before an item creation in the new location, it's
possible for these operations to execute the opposite way around.
Somehow this borks inventory lookups on future logins (result in the no
inventory symptom).
I've attached a patch to 190 which simply makes these rest requests
synchronous rather than async. This appears to resolve the problem.
Although this particular case could possibly be alternatively resolved
by doing only one db operation (the mysql for item add already appears
to be a REPLACE operation), I think the potential race conditions are
also the cause of some other manifestations of grid inventory brokeness
we've seen lately.
However, I haven't been around long enough not to know there wasn't some
very good reason for going async here, and that this should be fixed in
some other way. Certainly I can't see any obvious timeouts on the sync
requests, so it could be that interesting things may happen if these
take too long (though it's probably a reasonably simple matter to fit
timeouts if necessary). Any thoughts?
If the patch is okay, please could somebody apply it.
http://opensimulator.org/mantis/file_download.php?file_id=22&type=bug
Thanks,
More information about the Opensim-dev
mailing list