File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased changes
4
4
5
+ ## 6.1.7
6
+
7
+ - Add load-shedding to the V2 GRPC API. In particular, if at the time of the
8
+ request the node is already handling more than
9
+ ` CONCORDIUM_NODE_GRPC2_MAX_CONCURRENT_REQUESTS ` requests then the incoming
10
+ request will be immediately rejected.
11
+
5
12
## 6.1.6
6
13
7
14
- Fix a regression in the start up time. When upgrading from an earlier version, the first start-up
Original file line number Diff line number Diff line change @@ -2613,13 +2613,14 @@ where
2613
2613
// an Err(Overloaded). So record resource exhaustion
2614
2614
// in the metrics.
2615
2615
let ( code, response) = if e. is :: < tower:: load_shed:: error:: Overloaded > ( ) {
2616
+ // return a response with empty body of the correct type. `to_http`
2617
+ // constructs a response with a `BoxBody` but
2618
+ // here we need a more general one to make the service generic enough.
2616
2619
let new_response =
2617
2620
tonic:: Status :: resource_exhausted ( "Too many concurrent requests." )
2618
- . to_http ( ) ;
2619
- (
2620
- tonic:: Code :: ResourceExhausted ,
2621
- Ok ( new_response. map ( |_| Default :: default ( ) ) ) ,
2622
- )
2621
+ . to_http ( )
2622
+ . map ( |_| Default :: default ( ) ) ;
2623
+ ( tonic:: Code :: ResourceExhausted , Ok ( new_response) )
2623
2624
} else {
2624
2625
( tonic:: Code :: Internal , Err ( e) )
2625
2626
} ;
You can’t perform that action at this time.
0 commit comments