fix(envoy-client): fix handling actor event ack#4599
fix(envoy-client): fix handling actor event ack#4599MasterPtato wants to merge 1 commit into04-09-do_not_merge_sandbox_benchesfrom
Conversation
PR Review: fix(envoy-client): fix handling actor event ackSummaryThis PR fixes actor event ack handling in the envoy-client by introducing a Issues1. Actor removal removes all generations, not just the current oneIn if entry.received_stop {
ctx.actors.remove(&event.checkpoint.actor_id); // removes ALL generations
}This removes the entire actor ID entry including all generations. The old cleanup code correctly scoped removal to the specific generation: actor_entry.remove(&checkpoint.generation);
if actor_entry.is_empty() {
ctx.actors.remove(&checkpoint.actor_id);
}If multiple generations of the same actor exist (e.g., rapid restart scenarios), this could prematurely remove entries for other generations that are still active. 2. Regression: actor entries from crashed actors never cleaned upThe old The acknowledged TODO compounds this: // TODO: If the envoy disconnects, actor stops, then envoy reconnects, we will send the stop event
// but there is no mechanism to remove the actor entry afterwards.That's two known entry-leak paths introduced by this change. Consider whether a TTL or the 3. Stop event pushed to history then entry is immediately removedIn SuggestionsCloseEvent polyfill ( The polyfill looks functionally correct for practical use. One minor note: the native serverless router ( token: config.token ?? token,Simple and correct. The intent (prefer explicitly configured token over generated) is clear. LTO removal ( Removing package-level Script deletions The removed scripts ( PR ChecklistThe PR description template was not filled in — no summary of the issue being fixed, no test description, and checklist items are unchecked. Please fill in at minimum the type of change (bug fix) and a brief description of what was broken and how this fixes it. |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: