Skip to content

Commit f9b6977

Browse files
DylanRussellpellaredtigrannajaryan
authored
Minor spec change around UNAVAILABLE / RetryInfo (#669)
* Minor spec change around UNAVAILABLE / RetryInfo * MUST -> SHOULD return unavailable * Update docs/specification.md Co-authored-by: Robert Pająk <[email protected]> * Change language a bit * Tweak language * Add RetryInfo example back * Update docs/specification.md --------- Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Tigran Najaryan <[email protected]>
1 parent 7d47cd5 commit f9b6977

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/specification.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,18 @@ retryable and not-retryable:
225225
and cannot be deserialized or processed by the server. The client
226226
SHOULD maintain a counter of such dropped data.
227227

228-
The server MUST indicate retryable errors using code
228+
The server SHOULD indicate retryable errors using code
229229
[Unavailable](https://godoc.org/google.golang.org/grpc/codes) and MAY supply
230230
additional
231231
[details via status](https://godoc.org/google.golang.org/grpc/status#Status.WithDetails)
232232
using
233-
[RetryInfo](https://github.com/googleapis/googleapis/blob/6a8c7914d1b79bd832b5157a09a9332e8cbd16d4/google/rpc/error_details.proto#L40)
234-
containing 0 value of RetryDelay. Here is a sample Go code to illustrate:
233+
[RetryInfo](https://github.com/googleapis/googleapis/blob/6a8c7914d1b79bd832b5157a09a9332e8cbd16d4/google/rpc/error_details.proto#L40).
234+
Here is a sample Go code to illustrate:
235235

236236
```go
237237
// Do this on server side.
238238
st, err := status.New(codes.Unavailable, "Server is unavailable").
239-
WithDetails(&errdetails.RetryInfo{RetryDelay: &duration.Duration{Seconds: 0}})
239+
WithDetails(&errdetails.RetryInfo{RetryDelay: &duration.Duration{Seconds: 5}})
240240
if err != nil {
241241
log.Fatal(err)
242242
}
@@ -309,7 +309,7 @@ If the server is unable to keep up with the pace of data it receives from the
309309
client then it SHOULD signal that fact to the client. The client MUST then
310310
throttle itself to avoid overwhelming the server.
311311

312-
To signal backpressure when using gRPC transport, the server MUST return an
312+
To signal backpressure when using gRPC transport, the server SHOULD return an
313313
error with code [Unavailable](https://godoc.org/google.golang.org/grpc/codes)
314314
and MAY supply additional
315315
[details via status](https://godoc.org/google.golang.org/grpc/status#Status.WithDetails)

0 commit comments

Comments
 (0)