Filesystem doesn't retry Drive's 409 Conflict on delete

未关闭 适合新手
#465 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
api, backend

调研方向

从文件系统的 rm 实现开始,并将其删除处理方式与 #461 中为测试添加的 pydrive_retry 辅助函数进行比较。仅在删除时,为原因是 conflict 的 Drive 409 响应添加重试处理,同时保留现有将 404 视为成功的处理方式。检查与删除相关的测试,并确认首次尝试后再次删除能够成功。

由索引模型根据 Issue 内容生成。

描述

Right after a file changes, Drive sometimes answers a DELETE with 409 Conflict (reason conflict). Live CI hit this three times during test cleanup on the 2.0 fix PRs: twice right after a content update and once right after a conversion to a Google Doc. #461 makes the tests' retry helper (pydrive_retry) retry it. The filesystem's own rm doesn't retry it.

Neither rclone's Drive backend nor google-api-python-client retries a 409, so 2.0 leaves the filesystem as it is.

If a user reports fs.rm() failing with 409 right after a write, add the retry, for reason conflict on delete only. It's safe: if an earlier attempt went through, the repeated delete gets the 404 that the delete code already treats as done.

🤖 Generated with Claude Code

主要语言
Python
星标
671
派生
76
平均合并
17 小时 55 分钟
30 天内合并 PR
46

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

iterative/PyDrive2 的其他 Issue

查看 iterative/PyDrive2 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。