Skip to content

fix(naming): redo failure handling, guard cleanup, snapshot reuse - #344

Merged
CherishCai merged 3 commits into
mainfrom
fix/redo-failure-and-naming-snapshot-reuse
Dec 1, 2026
Merged

CherishCai merged 3 commits into
mainfrom
fix/redo-failure-and-naming-snapshot-reuse

Conversation

@CherishCai

Copy link
Copy Markdown
Collaborator

Summary

  • redo: redo steps only looked at the transport result, so a server response with a non-success result_code counted as success and froze the task via call_back(Ok(())), silently losing the instance or subscription. Every macro response now goes through handle_response.
  • connection: the handshake's private pump guard and ActiveConnection::drop's hand-rolled abort() are unified into one AbortOnDrop. JoinHandle::drop only detaches, so the old design required every serve() return path to call abort(); now dropping the owning structure is sufficient.
  • naming: cluster-scoped listeners cloned and filtered the whole instance list on every push. A push whose instances all match the listener's clusters now reuses the pushed Arc unchanged, and listeners sharing an identical cluster list share one filtered snapshot per push.

No public API changes.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-features -- -D warnings
  • cargo test --all-features --lib — 272 passed, 0 failed, 2 ignored
  • Each new test was red-checked by reverting the behavior it pins

CherishCai and others added 3 commits December 1, 2026 10:10
Redo steps only inspected the transport result, so a response carrying a
non-success result code was recorded as success. `call_back(Ok(()))` then
freezes the task, silently dropping the instance or subscription it was
supposed to apply. Route every macro response through `handle_response`
so business errors keep the task retrying.

Co-authored-by: Qoder <noreply@qoder.com>
The handshake kept a private guard for the stream pump while the supervisor
hand-rolled an `abort()` in `ActiveConnection::drop`, and every `serve()`
return had to remember to call it. `JoinHandle::drop` only detaches, so a
missed call leaks the task. Share one `AbortOnDrop` type in the connection
module; dropping the owning structure is now sufficient on every path.

Co-authored-by: Qoder <noreply@qoder.com>
Cluster-scoped listeners each cloned and filtered the full instance list on
every push, even when the push already matched their clusters. Keep the
pushed Arc when every instance matches, and share one filtered snapshot per
identical cluster list within a single push.

Co-authored-by: Qoder <noreply@qoder.com>
@CherishCai
CherishCai merged commit 40ae68f into main Dec 1, 2026
18 checks passed
@CherishCai
CherishCai deleted the fix/redo-failure-and-naming-snapshot-reuse branch December 1, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant