26 lines
1.4 KiB
Markdown
26 lines
1.4 KiB
Markdown
# Router Request Cancellation Propagation
|
|
|
|
## Module
|
|
Router
|
|
|
|
## Status
|
|
IMPLEMENTED
|
|
|
|
## Description
|
|
CANCEL frame type for explicit request cancellation, inflight request tracking, client disconnect detection with automatic cancellation propagation to microservices, and CancellationToken integration in endpoint handlers.
|
|
|
|
## Implementation Details
|
|
- **Modules**: `src/Router/__Libraries/StellaOps.Router.Common/`, `src/Router/__Libraries/StellaOps.Microservice/`
|
|
- **Key Classes**:
|
|
- `RequestDispatcher` (`src/Router/__Libraries/StellaOps.Microservice/RequestDispatcher.cs`) - tracks inflight requests and propagates cancellation tokens
|
|
- `PathMatcher` (`src/Router/__Libraries/StellaOps.Router.Common/PathMatcher.cs`) - used in dispatch pipeline with cancellation support
|
|
- **Frame Types**: CANCEL frame for explicit request cancellation
|
|
- **Source**: batch_52/file_00.md
|
|
|
|
## E2E Test Plan
|
|
- [ ] Send a CANCEL frame for an inflight request and verify the endpoint handler's CancellationToken is triggered
|
|
- [ ] Disconnect a client during a long-running request and verify automatic cancellation propagation
|
|
- [ ] Verify inflight request tracking: confirm the dispatcher tracks active requests and cleans up after cancellation
|
|
- [ ] Verify endpoint handlers receive CancellationToken and can respond to cancellation gracefully
|
|
- [ ] Verify cancellation of a non-existent request ID is handled without errors
|