little fixes 2

This commit is contained in:
2024-06-21 23:38:22 +02:00
parent e68bb25edd
commit 50a4a7cb45
2 changed files with 5 additions and 5 deletions

View File

@@ -66,13 +66,13 @@ public class InvalidationQueueService {
remoteObjectServiceClient.notifyUpdate(forHost.getKey(), obj);
sent++;
} catch (Exception e) {
if (e.getCause().getClass().equals(InterruptedException.class)) {
Log.info("Invalidation sender exiting");
return;
}
Log.info("Failed to send invalidation to " + forHost.getKey() + " of " + obj + ": " + e.getMessage() + " will retry");
pushInvalidationToOne(forHost.getKey(), obj);
}
if (Thread.interrupted()) {
Log.info("Invalidation sender exiting");
return;
}
}
stats += forHost.getKey() + ": " + sent + " ";
}

View File

@@ -120,7 +120,7 @@ public class RemoteHostManager {
// FIXME:
private boolean reachable(HostInfo hostInfo) {
try {
return withClient(hostInfo.getAddr(), hostInfo.getPort(), Optional.of(30000L /*ms*/), c -> {
return withClient(hostInfo.getAddr(), hostInfo.getPort(), Optional.of(5000L /*ms*/), c -> {
var ret = c.ping(PingRequest.newBuilder().setSelfname(selfname).build());
if (!ret.getSelfname().equals(hostInfo.getName())) {
throw new IllegalStateException("Ping selfname returned " + ret.getSelfname() + " but expected " + hostInfo.getName());