googleapis / googleapis/google-cloud-cpp
Bigtable BulkApply does not respect custom retry policies for individual mutation errors
- 主要语言
- C++
- 星标
- 659
- 派生
- 462
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 89
描述
## Problem
We use the current retry policy (which can be customized by the application) to determine whether stream failures are transient.
However, we use the *default* retry policy to determine whether individual mutation errors are transient. Specifically, we only add mutations with default transient errors to the next batch:
https://github.com/googleapis/google-cloud-cpp/blob/0117ba9d7c97f6b512da5e683015f59a07699d74/google/cloud/bigtable/internal/bulk_mutator.cc#L109-L110
## Implementation notes
- The annoying this is that the `BulkMutatorState` code path is shared by a client with `Options` and one without. So there will not always be a retry policy available. We likely will have to have branching in the common code path, which is a red-flag that it should not be a common code path. :shrug:
- We should only check if the error is transient, with `IsPermanentFailure() const`. We should not be pinging `OnFailure()` for individual mutations. (e.g. consider a `DataLimitedErrorCountPolicy(...)`. We want that to apply to stream failures only, not individual mutations).
https://github.com/googleapis/google-cloud-cpp/blob/0117ba9d7c97f6b512da5e683015f59a07699d74/google/cloud/bigtable/retry_policy.h#L71-L73
- We do not need to check `IsExhausted() const`. That will be done in the DataConnection's retry loop.
https://github.com/googleapis/google-cloud-cpp/blob/0117ba9d7c97f6b512da5e683015f59a07699d74/google/cloud/bigtable/internal/data_connection_impl.cc#L181
贡献指南
调研方向
从 cloud/bigtable/internal/bulk_mutator.cc 中的 mutation 重试决策开始,跟踪有 Options 和没有 Options 的客户端所共用的 BulkMutatorState 路径。阅读 cloud/bigtable/retry_policy.h 和 cloud/bigtable/internal/data_connection_impl.cc,了解瞬态错误检查和 stream 重试是如何分开的。完成的标准是:单个 mutation 错误遵循适用的自定义 policy,且不调用 OnFailure() 或检查 IsExhausted()。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100