Skip to content

Re-test disconnect cleanup for .cat --follow once xs#164 is fixed #55

Description

@cablehead

Re-test when cablehead/xs#164 is released

582503c interrupts a streaming request's job when its client disconnects. For .bus sub and plain generated streams, the thread is released right away. For handlers that use .cat --follow or .last --follow, the thread stays parked until the next frame matching the follower's topics arrives, because cross-stream's follow loop doesn't check the interrupt. Details and repro are in cablehead/xs#164.

On c7383e2 (cross-stream 0.14.0), 20 disconnected SSE clients on a .cat --follow -T "a,b,c" handler left one thread each parked (38 threads against a baseline of 18) until a single matching frame was appended. Then it dropped straight back to 18.

When xs#164 ships

  • Bump cross-stream in Cargo.toml to the release with the fix
  • Re-run the disconnect check: open 20 SSE streams on a .cat --follow handler, disconnect them, and with no new frames appended, confirm the thread count returns to baseline within about a second
  • Do the same for .last --follow
  • Consider extending the test_handler.rs disconnect test (the ten-subscriber case added in 582503c) to cover .cat --follow, so this stays fixed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions