Commit 07291eb
committed
Merged PR 58375: [SignalR] Extra backpressure timeout
#### AI description (iteration 1)
#### PR Classification
This PR is a feature enhancement that improves SignalR’s message buffering by adding an extra backpressure cancellation timeout.
#### PR Summary
The changes strengthen SignalR's handling of backpressure conditions by introducing a 5-second timeout for message buffering operations and updating the related tests to verify cancellation behavior.
- **`src/SignalR/server/SignalR/test/Internal/MessageBufferTests.cs`**: Added tests for both default cancellation and explicit cancellation during backpressure, and refined test naming and timeout assertions.
- **`src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs`**: Introduced a new backpressure timeout test scenario and updated the simulation of timeout conditions.
- **`src/SignalR/common/Shared/MessageBuffer.cs`**: Implemented the extra 5-second cancellation timeout using a TimeProvider and linked cancellation tokens to improve backpressure handling.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->1 parent fdb16a3 commit 07291eb
4 files changed
Lines changed: 124 additions & 30 deletions
File tree
- src/SignalR
- server
- Core/src
- SignalR/test
- Internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
72 | | - | |
| 72 | + | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | 136 | | |
139 | 137 | | |
140 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | | - | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | 277 | | |
279 | 278 | | |
280 | 279 | | |
281 | 280 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 281 | + | |
| 282 | + | |
286 | 283 | | |
287 | 284 | | |
288 | | - | |
289 | | - | |
290 | 285 | | |
291 | 286 | | |
292 | 287 | | |
| |||
Lines changed: 22 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5272 | 5272 | | |
5273 | 5273 | | |
5274 | 5274 | | |
| 5275 | + | |
5275 | 5276 | | |
5276 | 5277 | | |
5277 | 5278 | | |
5278 | 5279 | | |
5279 | 5280 | | |
| 5281 | + | |
5280 | 5282 | | |
5281 | 5283 | | |
5282 | 5284 | | |
| |||
5307 | 5309 | | |
5308 | 5310 | | |
5309 | 5311 | | |
| 5312 | + | |
| 5313 | + | |
| 5314 | + | |
| 5315 | + | |
5310 | 5316 | | |
5311 | 5317 | | |
5312 | 5318 | | |
5313 | | - | |
5314 | | - | |
5315 | | - | |
5316 | 5319 | | |
5317 | | - | |
5318 | | - | |
| 5320 | + | |
| 5321 | + | |
| 5322 | + | |
| 5323 | + | |
| 5324 | + | |
| 5325 | + | |
| 5326 | + | |
5319 | 5327 | | |
5320 | | - | |
5321 | | - | |
5322 | 5328 | | |
5323 | | - | |
5324 | | - | |
5325 | | - | |
5326 | | - | |
| 5329 | + | |
| 5330 | + | |
| 5331 | + | |
| 5332 | + | |
| 5333 | + | |
| 5334 | + | |
| 5335 | + | |
| 5336 | + | |
| 5337 | + | |
5327 | 5338 | | |
5328 | 5339 | | |
5329 | | - | |
5330 | | - | |
5331 | | - | |
5332 | | - | |
5333 | 5340 | | |
5334 | 5341 | | |
5335 | 5342 | | |
| |||
Lines changed: 90 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
| 566 | + | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
610 | 698 | | |
611 | 699 | | |
612 | 700 | | |
| |||
0 commit comments