mirror of
https://github.com/block/buzz.git
synced 2026-10-31 22:41:12 +00:00
Limit aggregate retry fan-out to tombstones
Only deletion retries need to repair the post-commit disconnect/fan-out gap; leave byte-identical active retries as no-op deliveries. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
This commit is contained in:
@@ -121,12 +121,14 @@ pub async fn submit_aggregate(
|
||||
let retry_private_event;
|
||||
let dispatch_events: &[buzz_core::StoredEvent] = if commit.inserted {
|
||||
&commit.events
|
||||
} else {
|
||||
} else if !commit.head.active {
|
||||
// A tombstone may have committed before disconnect propagation failed.
|
||||
// Its exact retry must fan the durable head out again after repairing
|
||||
// that propagation; otherwise live Desktop sessions never learn it.
|
||||
retry_private_event = buzz_core::StoredEvent::new(commit.private_event.clone(), None);
|
||||
std::slice::from_ref(&retry_private_event)
|
||||
} else {
|
||||
&[]
|
||||
};
|
||||
for stored in dispatch_events {
|
||||
crate::handlers::event::dispatch_persistent_event(
|
||||
|
||||
Reference in New Issue
Block a user