Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/core/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ impl Registry {
msg = rx.recv() => match msg {
Ok(ev) => me.handle_event(&ev).await,
Err(tokio::sync::broadcast::error::RecvError::Closed) => break,
Err(tokio::sync::broadcast::error::RecvError::Lagged(_)) => {
Err(tokio::sync::broadcast::error::RecvError::Lagged(n)) => {
me.bus.publish(
Event::new(EventKind::TaskFailed)
.with_reason("registry_listener_lagged")
Event::new(EventKind::SubscriberOverflow)
.with_task("registry")
.with_reason(format!("registry_listener_lagged({})", n))
);
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/events/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ impl Event {
/// Creates a new event of the given kind with current timestamp and next sequence number.
pub fn new(kind: EventKind) -> Self {
Self {
seq: EVENT_SEQ.fetch_add(1, AtomicOrdering::Relaxed),
seq: EVENT_SEQ.fetch_add(1, AtomicOrdering::Release),
kind,
at: SystemTime::now(),
attempt: None,
Expand Down
4 changes: 3 additions & 1 deletion src/policies/jitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ impl JitterPolicy {
JitterPolicy::None => delay,
JitterPolicy::Full => self.full_jitter(delay),
JitterPolicy::Equal => self.equal_jitter(delay),
JitterPolicy::Decorrelated => delay,
JitterPolicy::Decorrelated => {
panic!("Decorrelated jitter requires context; use apply_decorrelated() instead")
}
}
}

Expand Down