Cassandra: an unavailable replica set is reported as a 500 storage fault rather than a retryable 503
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 70/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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)
- Lenguaje dominante
- Rust
- Estrellas
- 517
- Forks
- 60
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 25
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ExtendDB/extenddb
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
backend:mongodb bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 2 días
-
backend:cassandra bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
backend:cassandra bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
Todos los issues de ExtendDB/extenddb
Issues similares
-
area: library data-loss type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
alplabai/signex#1740 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
test(fslc): the unreadable mutate catalog test pins the Unix I/O error text and fails on WindowsPosiblemente ocupada @rizumita la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 1 día
-
ServerProperties defaults white-list to true, so a fresh --dedicated server silently locks itselfAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
horizon-rust/horizon#3888 ·
Los mantenedores suelen responder en 1 día
-
refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día