googleapis / googleapis/google-cloud-cpp
RPC timeouts and retry loops across services
- Ngôn ngữ chính
- C++
- Star
- 659
- Fork
- 462
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 89
Mô tả
The `google::cloud::bigtable::RPCRetryPolicy` classes have special member functions to setup a timeout:
https://github.com/googleapis/google-cloud-cpp/blob/81adbdabca2da794875fd567591fddc2cf0c8394/google/cloud/bigtable/rpc_retry_policy.h#L98-L101
https://github.com/googleapis/google-cloud-cpp/blob/81adbdabca2da794875fd567591fddc2cf0c8394/google/cloud/bigtable/rpc_retry_policy.cc#L53-L57
This is used in the synchronous retry loop, e.g.:
https://github.com/googleapis/google-cloud-cpp/blob/81adbdabca2da794875fd567591fddc2cf0c8394/google/cloud/bigtable/table.cc#L90-L95
But not in the asynchronous retry loop:
https://github.com/googleapis/google-cloud-cpp/blob/81adbdabca2da794875fd567591fddc2cf0c8394/google/cloud/internal/async_retry_unary_rpc.h#L145-L149
That asynchronous retry loop is used in spanner too, and the `RetryPolicy` for spanner does not have a `Setup()` member function. Furthermore, the same retry policy class is used in storage, where we would't want to introduce it (because that would create an unwanted dependency on gRPC).
We need a cleaner way to setup per-RPC timeouts across all services, with good support for REST, and we need to use that on the asynchronous and synchronous loops.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với google/cloud/bigtable/rpc_retry_policy.h và .cc, google/cloud/bigtable/table.cc, cùng với google/cloud/internal/async_retry_unary_rpc.h. So sánh các vòng lặp retry đồng bộ và bất đồng bộ cũng như các retry policy của Bigtable và Spanner, sau đó xác định cơ chế timeout dùng chung cho mỗi RPC cần cung cấp những gì cho REST mà không thêm dependency gRPC vào Storage.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp, grpc
- Lĩnh vực
- backend-api-design, distributed-systems
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100