aboutsummaryrefslogtreecommitdiffstats
path: root/jrt
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2021-12-16 07:30:45 +0000
committerArne H Juul <arnej@yahooinc.com>2021-12-16 14:03:52 +0000
commit94badd28fff06328775eb5cac03a4f4487d43dd2 (patch)
tree4cff3b60d87222fed809b9abd17311b97e7c52aa /jrt
parent781d75fea7f5e6bb391267201adbf5c4598526d4 (diff)
start new incremental fetch immediately
Diffstat (limited to 'jrt')
-rw-r--r--jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java b/jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java
index 51a3c6b6146..369c02554c2 100644
--- a/jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java
+++ b/jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java
@@ -174,9 +174,11 @@ public class Mirror implements IMirror {
if (requestDone) {
handleUpdate();
requestDone = false;
- return;
}
+ startFetchRequest();
+ }
+ private void startFetchRequest() {
if (target != null && ! slobroks.contains(currSlobrok)) {
log.log(Level.INFO, "location broker "+currSlobrok+" removed, will disconnect and use one of: "+slobroks);
target.close();
@@ -204,7 +206,7 @@ public class Mirror implements IMirror {
req.parameters().add(new Int32Value(5000)); // mstimeout
target.invokeAsync(req, 40.0, reqWait);
}
-
+
private void handleUpdate() {
if (!req.checkReturnTypes("iSSSi")
|| (req.returnValues().get(2).count() !=
@@ -215,8 +217,7 @@ public class Mirror implements IMirror {
" (error code " + req.errorCode() + ")");
}
target.close();
- target = null;
- updateTask.scheduleNow(); // try next slobrok
+ target = null; // try next slobrok
return;
}
Values answer = req.returnValues();
@@ -235,7 +236,6 @@ public class Mirror implements IMirror {
Entry[] newSpecs;
if (diffFromGeneration == 0) {
newSpecs = new Entry[numNames];
-
for (int idx = 0; idx < numNames; idx++) {
newSpecs[idx] = new Entry(n[idx], s[idx]);
}
@@ -270,7 +270,6 @@ public class Mirror implements IMirror {
updates = u;
}
backOff.reset();
- updateTask.schedule(0.1); // be nice
}
/**