From 0816168296883b086dbc50af0b4ebc9fbdf3afe7 Mon Sep 17 00:00:00 2001 From: Arseny Sher Date: Thu, 15 Dec 2022 12:36:57 +0400 Subject: [PATCH] Hotfix: terminate subscription if channel is full. Might help as a hotfix, but need to understand root better. --- storage_broker/src/bin/storage_broker.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage_broker/src/bin/storage_broker.rs b/storage_broker/src/bin/storage_broker.rs index fdf2637b4d..1a743394ad 100644 --- a/storage_broker/src/bin/storage_broker.rs +++ b/storage_broker/src/bin/storage_broker.rs @@ -369,8 +369,9 @@ impl BrokerService for Broker { Err(RecvError::Lagged(skipped_msg)) => { missed_msgs += skipped_msg; if let Poll::Ready(_) = futures::poll!(Box::pin(warn_interval.tick())) { - warn!("dropped {} messages, channel is full", missed_msgs); - missed_msgs = 0; + error!("subscription id={}, key={:?}, addr={:?} dropped {} messages, channel is full", + subscriber.id, subscriber.key, subscriber.remote_addr, missed_msgs); + Err(Status::new(Code::Internal, "full channel"))?; } } Err(RecvError::Closed) => {