XDRIVE: S3兼容存储因先删除非空父目录再删子文件报错412
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Read transport/internet/xdrive/s3.go around lines 490–518, where the issue says abandoned-session cleanup deletes parent directories before their child files. Check the deletion order against S3-compatible storage behavior, then inspect nearby tests for cleanup coverage. Done means garbage collection no longer sends a delete for a non-empty parent before deleting its children, avoiding the reported 412 response.
Written by the indexing model from the issue text.
Description
完整性要求
- 我读完了 issue 模板中的所有注释,确保填写符合要求。
- 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
- 我提供了完整的配置文件和日志,而不是出于自己的判断只给出截取的部分。
- 我搜索了 issues, 没有发现已提出的类似问题。
- 问题在 Release 最新的版本上可以成功复现
描述
有一些S3兼容存储因先删父目录再删子文件报错412,因为他们不允许删除非空目录,导致垃圾回收一直失败:
[Warning] transport/internet/xdrive: failed to collect abandoned sessions > transport/internet/xdrive: S3 DELETE answered 412
相关代码如下:
https://github.com/XTLS/Xray-core/blob/v26.11.9/transport/internet/xdrive/s3.go#L490-L518
重现方式
逻辑问题,无需重现
客户端配置
{
"tag": "xdrive-out",
"protocol": "vless",
"settings": {
"address": "127.0.0.1",
"port": 10000,
"id": "xxx",
"encryption": "xxx"
},
"streamSettings": {
"network": "xdrive",
"security": "none",
"xdriveSettings": {
"service": "s3",
"remoteFolder": "xxx",
"secrets": [
"xxx",
"xxx"
],
"s3": {
"endpoint": "https://s3.example.com",
"region": "xxx",
"bucket": "xxx",
"pathStyle": true
}
}
},
"mux": {
"enabled": true
}
}
服务端配置
{
"tag": "xdrive",
"listen": "127.0.0.1",
"port": 10000,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "xxx"
}
],
"decryption": "xxx"
},
"streamSettings": {
"network": "xdrive",
"xdriveSettings": {
"service": "s3",
"remoteFolder": "xxx",
"secrets": [
"xxx",
"xxx"
],
"s3": {
"endpoint": "https://s3.example.com",
"region": "xxx",
"bucket": "xxx",
"pathStyle": true
}
}
}
}
客户端日志
无
服务端日志
[Warning] transport/internet/xdrive: failed to collect abandoned sessions > transport/internet/xdrive: S3 DELETE answered 412
- Dominant language
- Go
- Stars
- 43.3k
- Forks
- 6.2k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 55
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from XTLS/Xray-core
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openclaw/crabbox#3249 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
ec2-subnet, security-group and internet-gateway skip all resources when one is deleted during the scanPossibly taken @toabctl claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
gruntwork-io/cloud-nuke#1208 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
snowflakedb/gosnowflake#1872 ·
-
MCP `shadow` says `out` is a folder, but for TS, Python, C, Go and Ruby it is the module's fileOpengood first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
erkamyaman/rust-anything#1328 ·
Maintainers usually reply within 1 day