mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-11 10:23:17 +08:00
Implements `PAUSED` state for issue #119. The snapshot files are kept locally on node VM in a separate folder. At resume time, scheduler uses a node VM hint and picks up a worker from the same node where files were stored at suspend time. The local file management solution is temporary and will be replaced once @msau42 introduces a new component that is supposed to manage files on the node VM. - [X] Tests pass - [X] Manual tests with counter demo ``` >kubectl ate create actor my-counter-1 --template ate-demo-counter/counter >curl -X POST -H "Host: my-counter-1.actors.resources.substrate.ate.dev" http://localhost:8000 hello from: 169.254.17.2 | preserved memory count: 1 >curl -X POST -H "Host: my-counter-1.actors.resources.substrate.ate.dev" http://localhost:8000 hello from: 169.254.17.2 | preserved memory count: 2 >kubectl ate pause actor my-counter-1 -o json > curl -X POST -H "Host: my-counter-1.actors.resources.substrate.ate.dev" http://localhost:8000 hello from: 169.254.17.2 | preserved memory count: 3 ``` ### Breaking change This PR introduces a breaking change in the Actor proto. All existing actor needs to be recreated, prior testing PAUSE functionality.