|
|
@ -120,10 +120,13 @@ public class PeerTaskExecutor { |
|
|
|
final PeerTask<T> peerTask, final EthPeer peer) { |
|
|
|
final PeerTask<T> peerTask, final EthPeer peer) { |
|
|
|
String taskClassName = peerTask.getClass().getSimpleName(); |
|
|
|
String taskClassName = peerTask.getClass().getSimpleName(); |
|
|
|
AtomicInteger inflightRequestCountForThisTaskClass = |
|
|
|
AtomicInteger inflightRequestCountForThisTaskClass = |
|
|
|
inflightRequestCountByClassName.getOrDefault(taskClassName, new AtomicInteger(0)); |
|
|
|
inflightRequestCountByClassName.computeIfAbsent( |
|
|
|
if (!inflightRequestGauge.isLabelsObserved(taskClassName)) { |
|
|
|
taskClassName, |
|
|
|
inflightRequestGauge.labels(inflightRequestCountForThisTaskClass::get, taskClassName); |
|
|
|
(k) -> { |
|
|
|
} |
|
|
|
AtomicInteger inflightRequests = new AtomicInteger(0); |
|
|
|
|
|
|
|
inflightRequestGauge.labels(inflightRequests::get, taskClassName); |
|
|
|
|
|
|
|
return inflightRequests; |
|
|
|
|
|
|
|
}); |
|
|
|
MessageData requestMessageData = peerTask.getRequestMessage(); |
|
|
|
MessageData requestMessageData = peerTask.getRequestMessage(); |
|
|
|
PeerTaskExecutorResult<T> executorResult; |
|
|
|
PeerTaskExecutorResult<T> executorResult; |
|
|
|
int retriesRemaining = peerTask.getRetriesWithSamePeer(); |
|
|
|
int retriesRemaining = peerTask.getRetriesWithSamePeer(); |
|
|
|