commercetools / commercetools/commercetools-sync-java
[Hactoberfest] Limit the number of retries on concurrency modification exceptions
- 主要语言
- Java
- 星标
- 40
- 派生
- 41
- PR 合并指标
- 30 天内没有已合并 PR
描述
**Situation**
Currently on concurrency modification exceptions the sync retries with no limit until there is no error. See:
https://github.com/commercetools/commercetools-sync-java/blob/7cacc37ef8a1412f9bf300ba08000c108db81b4f/src/main/java/com/commercetools/sync/commons/BaseSync.java#L115-L124
**Complication**
It causes unnecessary api calls if the platform returns 409 - ConcurrentModificationException for the requests.
**Resolution**
Limit the number of retries on concurrency modification exceptions.
贡献指南
调研方向
从 src/main/java/com/commercetools/sync/commons/BaseSync.java 的第 115-124 行开始,这里并发修改异常目前会触发同步重试。跟踪该重试路径,并确定应如何应用重试次数限制;完成的标准是请求在达到配置的限制后停止重试,而不是一直持续到成功。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100