mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
Update
This commit is contained in:
@@ -586,22 +586,16 @@ impl<S: SlotClock> ReprocessQueue<S> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the queue is full, evict the oldest entry to make room for newer envelopes.
|
// When the queue is full, drop the new envelope.
|
||||||
if self.awaiting_envelopes_per_root.len() >= MAXIMUM_QUEUED_ENVELOPES {
|
if self.awaiting_envelopes_per_root.len() >= MAXIMUM_QUEUED_ENVELOPES {
|
||||||
if self.envelope_delay_debounce.elapsed() {
|
if self.envelope_delay_debounce.elapsed() {
|
||||||
warn!(
|
warn!(
|
||||||
queue_size = MAXIMUM_QUEUED_ENVELOPES,
|
queue_size = MAXIMUM_QUEUED_ENVELOPES,
|
||||||
msg = "system resources may be saturated",
|
msg = "system resources may be saturated",
|
||||||
"Envelope delay queue is full, evicting oldest entry"
|
"Envelope delay queue is full, dropping envelope"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if let Some(oldest_root) =
|
return;
|
||||||
self.awaiting_envelopes_per_root.keys().next().copied()
|
|
||||||
&& let Some((_envelope, delay_key)) =
|
|
||||||
self.awaiting_envelopes_per_root.remove(&oldest_root)
|
|
||||||
{
|
|
||||||
self.envelope_delay_queue.remove(&delay_key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register the timeout.
|
// Register the timeout.
|
||||||
|
|||||||
Reference in New Issue
Block a user