Hi,
this morning I was investigating a GeoServer 2.1.0 locking up and stopping
responding to requests after a few calls and found out it was due to
an interaction between control-flow and the direct WMS integration of GWC.
When a WMS request with tiled=true matches a tile set GWC will intercept
the request and handle it internally by building a separate request that is then
send to the dispatcher.
This request in the dispatcher, and thus all dispatcher callbacks, being called
twice on that request, first for the original request, and then for the one that
GWC made up. See attached screenshot of a Eclipse debug session.
When this hits control flow it results in lost concurrency control tokens.
I'm going to harden control-flow to resist this mishbehavior, but similar
issues will happen for any callback that assumes, rightfully, that there is
a 1-1 relationship between a request and the callbacks.
For example the monitoring subsystem will likely register spurious, non
existing requests in this case.
Opinions on alternative fixes? One way could be to have GWC
call direclty the DefaultWebMapSErvice object, however there is a drawback
in doing that, which is that all GWC protocols would then be out of
control flow reach, so one could hit GWC very hard to bring the server
on its knees (just find an unseeded area/zoom level and throw as many
requests as possible at it).
Alternatively we could just update the DispatcherCallback documentation
and warn implementors that methods can be called multiple time per
physical request due to plugins making "inside requests" while serving
the main one.
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------