tuned to be a bit more less persistent on concurrency conflicts

This commit is contained in:
hns 2001-02-24 20:36:48 +00:00
parent 683263b9d9
commit 63cf63499d

View file

@ -314,12 +314,12 @@ public class RequestEvaluator implements Runnable {
} catch (ConcurrencyException x) {
res.reset ();
if (++tries < 10) {
if (++tries < 5) {
// try again after waiting some period
abortTransaction (true);
try {
// wait a bit longer with each try
int base = 200 * tries;
int base = 500 * tries;
Thread.currentThread ().sleep ((long) (base + Math.random ()*base*2));
} catch (Exception ignore) {}
continue;