-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Request handling code uses .expect() which will panic and crash the service on unexpected responses.
Locations
crates/service/src/meta_node/meta_handle.rs:266-268
let applied_state: AppliedState = forward_resp.try_into().expect("expect AppliedState");
let txn_reply: TxnReply = applied_state.try_into().expect("expect TxnReply");crates/service/src/meta_node/meta_node.rs:1440
let res: AppliedState = res.try_into().expect("expect AppliedState");Problem
These .expect() calls are in the request processing path. If the conversion fails due to:
- Protocol version mismatch
- Corrupted response from leader
- Serialization bugs
The entire meta service will crash, causing complete cluster unavailability.
Impact
- Single malformed response crashes the service
- No graceful error handling for clients
- Cascading failures if leader sends bad responses
Suggested Fix
let applied_state: AppliedState = forward_resp
.try_into()
.map_err(|e| MetaAPIError::Internal(format!("Invalid AppliedState: {:?}", e)))?;
let txn_reply: TxnReply = applied_state
.try_into()
.map_err(|e| MetaAPIError::Internal(format!("Invalid TxnReply: {:?}", e)))?;Priority
P1 - Service stability
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working