superfly/corrosion

Subscription channel can run out of capacity and drop events

开放

#183 创建于 2024年4月11日

 (2 条评论) (0 个反应) (0 位负责人)Rust (83 个派生)auto 404
buggood first issuehelp wanted

仓库指标

星标
 (1,817 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

The broadcast channel used by subscriptions (https://github.com/superfly/corrosion/blob/93561d180e3ebbdd275c9b80b9663b6dcb46e2fa/crates/corro-agent/src/api/public/pubsub.rs#L621) can run out of capacity and skip the events in case the data is read really fast from the disk.

Somehow, in this case, forward_sub_to_sender simply stops forwarding any event - https://github.com/superfly/corrosion/blob/93561d180e3ebbdd275c9b80b9663b6dcb46e2fa/crates/corro-agent/src/api/public/pubsub.rs#L728

It looks like the select! never matches RecvError::Lagged for some reasons.

贡献者指南