Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

List of a prefix 503s when a single object key contains an empty path segment (//)

未关闭
#116 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@alukach 已经在做这个了。

开始于 2026年7月21日。

  • #117 来自 @alukach —— 未关闭

评估

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

调研方向

首先跟踪 ListObjectsV2 的分页处理,直到 issue 中描述的严格 Path::parse 调用,然后检查现有的列表相关测试。使用包含 // 的键进行复现,并验证单个无效键不再导致整个前缀列表返回 503,同时应跳过有问题的键并发出警告,或以宽松方式处理该键。

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

描述

Summary

When a ListObjectsV2 page returned by the backend contains a single object whose key has an empty path segment (a //), multistore fails the entire list request with 503 ServiceUnavailable instead of listing the other (valid) keys. One malformed object key takes out the whole prefix.

object_store's strict Path parser rejects empty segments, and multistore propagates that as a fatal backend error for the page rather than skipping the offending key.

Observed error

Proxy log:

[WARN] multistore::proxy: request failed {
  error=backend error: Encountered object with invalid path:
         Path "raw//" contained empty path segment,
  status=503, s3_code=ServiceUnavailable
}

Client just sees the generic:

An error occurred (ServiceUnavailable) when calling the ListObjectsV2 operation
(reached max retries: 2): Service unavailable
Reproduction

An object genuinely exists in S3 with a // in its key (double slash after raw/):

s3://.../raw//b.e21.BW.f09_g17.SSP245-TSMLT-GAUSS-DELAYED-2045.001/atm/proc/tseries/day_1/....nc

aws s3 ls --no-sign-request against the raw bucket lists it fine (S3 keys are opaque byte strings and // is legal). Listing the same prefix through multistore 503s.

Only prefixes that contain such a key fail; sibling prefixes list normally.

Impact

A single stray upload with a double slash (or a zero-byte folder-marker object ending in //) makes an entire prefix unlistable through the gateway, with an error that gives the operator no hint about which object or why. S3 itself accepts and serves these keys, so the gateway is stricter than the backend it fronts.

Suggested fix

On list, don't let one unparseable key fail the page. Options:

  • Skip keys that fail strict Path::parse, ideally logging the raw key at warn so operators can find and fix it; or
  • Parse list keys leniently (Path::from / from_url_path, which tolerate empty segments) instead of strict parse.

At minimum, surface the offending raw key in the error so it's diagnosable without correlating backend logs.

Environment
  • multistore 0.6.3 (features: azure), via multistore-cf-workers on Cloudflare Workers
  • Backend: S3
主要语言
Rust
星标
20
派生
1
平均合并
1 天 8 小时
30 天内合并 PR
10

环境准备

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

从这里开始

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

developmentseed/multistore 的其他 Issue

查看 developmentseed/multistore 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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