Additionally, I think the following patch would be good, if my
understanding of how the module works is right.
The thing is that when there are more than one controller and there is
a timeout set, all but the first one can be called with a negative
maxWait argument, hence forcing the controller to add the request to
the queue. Instead, the callback should short circuit, because the
timeout has been exceeded already. The effect is more noticeable the
greater the load, since the actual elapsed time between calls to the
different controllers can vary more.
+++ b/src/extension/control-flow/src/main/java/org/geoserver/flow/ControlFlowCallback.java
@@ -73,7 +73,7 @@ public class ControlFlowCallback extends
AbstractDispatcherCallback implements
for (FlowController flowController : controllers) {
if(timeout > 0) {
long maxWait = maxTime - System.currentTimeMillis();
- if(!flowController.requestIncoming(request, maxWait))
+ if(maxWait <= 0 ||
!flowController.requestIncoming(request, maxWait))
throw new HttpErrorCodeException(503,
"Requested timeout out while waiting to be executed");
} else {
flowController.requestIncoming(request, -1);
On Thu, Mar 22, 2012 at 4:20 PM, Gabriel Roldan <groldan@anonymised.com> wrote:
Btw, I see now that SingleIpFlowController should rather extend
SingleQueueFlowController, so take that for granted, just no time to
update the patch right now
On Thu, Mar 22, 2012 at 10:56 AM, Gabriel Roldan <groldan@anonymised.com> wrote:
On Thu, Mar 22, 2012 at 10:54 AM, Andrea Aime
<andrea.aime@anonymised.com> wrote:
On Thu, Mar 22, 2012 at 2:50 PM, Gabriel Roldan <groldan@anonymised.com> wrote:
Hey Andrea, please take a look at the following patches for the
control-flow module (last six of them):
<https://github.com/groldan/geoserver/commits/controlflow>
Let me know if that seems good to commit.
I'm buried right now, but I'll have a look as soon as I can (the weekend at
worst)
Sounds good, thanks.
Gabriel
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
mob: +39 339 8844549
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
-------------------------------------------------------
--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.
--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.
--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.