partially synchronous inventory lookup

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

partially synchronous inventory lookup

Cristina Videira Lopes
Thanks to being away from my usual development environment, I was able to produce a situation where RequestInventoryForUser always fails for HG TPs, because of an erroneous IP address in some table. Not just inventory lookup fails, but the TP itself sort of fails.

This made me look closer to RestSessionService and RestObjectPosterResponse (I'm not sure why we have these two, they seem very similar, but that's not the point). I found out why the TPs fail, and in the process I saw lots of things that got me confused. I thought I'd share these observations here, I'm not sure I'll be in sync with the relevant people on the IRC.

- The TPs fail because the IP address for inventory server is invalid, and it turns out that the request for inventory is *partially* synchronous. So, the receiving region tries to get inventory and it gets stuck for a long time, which makes it miss the departing region's timeout of 20 seconds for confirmation that the other one got the agent. So the departing region thinks the TP failed.

- The timeout is left unspecified, hence the very long wait until it fails. Setting it to 10 secs makes my problem go away.

- This *partially* synchronous business comes from this: the method starts by doing a synchronous GetRequestStream and ends by doing an asynchronous BeginGetResponse. In looking at the .Net API documentation I see this note: "
Your application cannot mix synchronous and asynchronous methods for a particular request. If you call the GetRequestStream method, you must use the <a id="ctl00_rs1_mainContentContainer_ctl55" onclick="javascript:Track('ctl00_rs1_mainContentContainer_cpe299294_c|ctl00_rs1_mainContentContainer_ctl55',this);" href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse%28VS.80%29.aspx">GetResponse method to retrieve the response." (they consistently say the converse for the asynchronous methods)
They don't say what happens if we don't follow that rule, but the rule is quite assertive. Their examples are quite confusing, though, especially the example for the asynchronous BeginGetRequestStream.
But my point is that there is a chance that the receiving of inventory is synchronous because the request starts in synchronous mode...

- Another question: why is RequestInventoryForUser a POST operation?

Crista





_______________________________________________
Opensim-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-dev
Loading...