fix: streamline logging for evicted instances in InstanceRegistry
Build & Test (NowChessSystems) TeamCity build finished
Build & Test (NowChessSystems) TeamCity build finished
This commit is contained in:
+2
-4
@@ -125,10 +125,8 @@ class InstanceRegistry:
|
|||||||
val inst = Option(instances.remove(id))
|
val inst = Option(instances.remove(id))
|
||||||
meterRegistry.counter("nowchess.coordinator.instances.evicted").increment()
|
meterRegistry.counter("nowchess.coordinator.instances.evicted").increment()
|
||||||
inst.foreach { i =>
|
inst.foreach { i =>
|
||||||
if i.state == "DEAD" then
|
if i.state == "DEAD" then log.warnf("Evicted dead instance %s", id)
|
||||||
log.warnf("Evicted dead instance %s", id)
|
else log.warnf("Evicted stale instance %s (heartbeat older than %s)", id, maxAge)
|
||||||
else
|
|
||||||
log.warnf("Evicted stale instance %s (heartbeat older than %s)", id, maxAge)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stale
|
stale
|
||||||
|
|||||||
Reference in New Issue
Block a user