From 1334833b1480e36bc9b0cc063c2d73d20be8a77a Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 11 Oct 2001 11:42:38 +0000 Subject: [PATCH] try more often after concurrency conflicts, pause for longer between tries. --- src/helma/framework/core/RequestEvaluator.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index f711c73c..01de8ca1 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -372,12 +372,12 @@ public class RequestEvaluator implements Runnable { } catch (ConcurrencyException x) { res.reset (); - if (++tries < 5) { + if (++tries < 8) { // try again after waiting some period abortTransaction (true); try { // wait a bit longer with each try - int base = 500 * tries; + int base = 800 * tries; Thread.currentThread ().sleep ((long) (base + Math.random ()*base*2)); } catch (Exception ignore) {} continue; @@ -954,7 +954,8 @@ public class RequestEvaluator implements Runnable { } /** - * Get a scripting wrapper object for a user object. Active user objects use different wrapper classes. + * Get a scripting wrapper object for a user object. Active user objects are represented by + * the special ESUser wrapper class. */ public ESNode getNodeWrapper (User u) { if (u == null)