-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
🐛 bugSomething isn't workingSomething isn't working👋 good first issueGood for newcomersGood for newcomers
Milestone
Description
The KV store works with snapshots. Every worker gets a fresh version and returns an edited state. Then, the KV state gets overwritten by the new one.
When a worker run returns an Error, wws generates a default WasmOutput object with a generic error. This default output includes an empty kv state that may flush the original state.
To avoid this, wws should ignore states of failed workers run or provide create aWasmOutput instance with the initial KV value.
Related code
wasm-workers-server/src/main.rs
Lines 130 to 137 in be99d39
| .unwrap_or_else(|_| { | |
| WasmOutput::new( | |
| "<p>There was an error running this function</p>", | |
| HashMap::from([("content-type".to_string(), "text/html".to_string())]), | |
| StatusCode::SERVICE_UNAVAILABLE.as_u16(), | |
| HashMap::new(), | |
| ) | |
| }); |
Metadata
Metadata
Assignees
Labels
🐛 bugSomething isn't workingSomething isn't working👋 good first issueGood for newcomersGood for newcomers