Cassandra: an unavailable replica set is reported as a 500 storage fault rather than a retryable 503
维护者通常 4 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 70/100
调研方向
Start with the map_err sites in crates/storage-cassandra/src/cassandra_util.rs and the Database error mappings in data/delete_item.rs and data/transactions.rs; read crates/storage/src/error.rs to understand StorageError::Transient. Check how the Cassandra driver represents unavailable replicas and exhausted query plans. Done when these failures map to the retryable storage error, while delete and transaction logs retain the driver's error details.
由索引模型根据 Issue 内容生成。
描述
Summary
Every Cassandra driver error on the data path is wrapped as StorageError::Internal and reaches the client as HTTP 500 InternalServerError. Since #591 (the fix for #560), a ConsistentRead: true read, an export or an item write that cannot reach a local quorum of replicas fails this way. The repository's class for a failure that succeeds on retry is StorageError::Transient, which the engine maps to 503 ServiceUnavailable, the status the SDKs retry.
Observed
On a keyspace at replication factor 3 with one replica up:
GetItemwithConsistentRead: true: 500, logGet item: General error: No nodes available in query plan!(one node; the driver retried the unavailable read once and found no next node) orCannot achieve consistency level LOCAL_QUORUMwithUnavailableError { cl: LocalQuorum, required: 2, alive: 1 }(a cluster).PutItem,UpdateItem: 500 with the same texts prefixed byput_item read:orocc_read:.DeleteItemof an existing item andTransactWriteItems: 500 with the textDatabase error, which names neither the level nor the replica counts (admin_store.rsandmetadata_engine.rsproduce the literal; the two data paths that return it were not traced).
Expected
The driver's Unavailable error, and the No nodes available in query plan! that follows a retried Unavailable, map to StorageError::Transient, so the client receives 503 and the SDK retries. The DeleteItem and TransactWriteItems mappings carry the driver's text so the log names the level and the replica counts.
Where
crates/storage-cassandra/src/cassandra_util.rs(themap_errsites inexecute_at,query_rows_at,query_optional_at,query_lwt)crates/storage-cassandra/src/data/delete_item.rs,data/transactions.rs(theDatabase errormappings)crates/storage/src/error.rs(StorageError::Transient)
- 主要语言
- Rust
- 星标
- 517
- 派生
- 60
- 平均合并
- 4 天 10 小时
- 30 天内合并 PR
- 37
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ExtendDB/extenddb 的其他 Issue
-
难度 2/5 3-5 天 新手友好度 65/100
维护者通常 4 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 84/100
ExtendDB/extenddb#658 · 1 条评论 ·
维护者通常 4 天内回复
-
backend:postgresql bug
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 4 天内回复
-
backend:mongodb bug
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 4 天内回复
查看 ExtendDB/extenddb 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
compiler P4 perf
难度 2/5 1-3 小时 新手友好度 78/100
HerringtonDarkholme/hd-lang#1044 ·
维护者通常 1 天内回复
-
good first issue help wanted r-docs
难度 2/5 1-3 小时 新手友好度 72/100
servo/rust-smallvec#824 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
akitaonrails/ai-usagebar#552 ·
维护者通常 1 天内回复