Skip to content

Commit d472d01

Browse files
committed
Documentation and changelog.
1 parent 4243e74 commit d472d01

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Unreleased changes
44

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+
512
## 6.1.6
613

714
- Fix a regression in the start up time. When upgrading from an earlier version, the first start-up

concordium-node/src/grpc2.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2613,13 +2613,14 @@ where
26132613
// an Err(Overloaded). So record resource exhaustion
26142614
// in the metrics.
26152615
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.
26162619
let new_response =
26172620
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))
26232624
} else {
26242625
(tonic::Code::Internal, Err(e))
26252626
};

0 commit comments

Comments
 (0)