Commit Graph

416 Commits

Author SHA1 Message Date
Tony Garnock-Jones d007da2e94 (cargo-release) version 0.20.0 2022-01-10 13:39:48 +01:00
Tony Garnock-Jones 08c7bd3808 (cargo-release) version 0.15.0 2022-01-10 13:39:48 +01:00
Tony Garnock-Jones 96cfb1d4e7 (cargo-release) version 0.20.0 2022-01-10 13:39:48 +01:00
Tony Garnock-Jones 2d179d1e46 Avoid racy approaches to actor-termination.
They're still there: you can use turn.state.shutdown(), which enqueues
a message for eventual actor shutdown. But it's better to use
turn.stop_root(), which terminates the actor's root facet within the
current turn, ensuring that the actor's exit_status is definitely set
by the time the turn has committed.

This is necessary to avoid a racy panic in supervision: before this
change, an asynchronous SystemMessage::Release was sent when the last
facet of an actor was stopped. Depending on load (!), any retractions
resulting from the shutdown would be delivered before the Release
arrived at the stopping actor. The supervision logic expected
exit_status to be definitely set by the time release() fired, which
wasn't always true. Now that in-turn shutdown has been implemented,
this is a reliable invariant.

A knock-on change is the need to remove
enqueue_for_myself_at_commit(), replacing it with a use of
pending.for_myself.push(). The old enqueue_for_myself_at_commit
approach could lead to lost actions as follows:

    A: start linked task T, which spawns a new tokio coroutine
            T: activate some facet in A and terminate A's root facet
            T: at this point, A transitions to "not running"
    A: spawn B, enqueuing a call to B's boot()
    A: commit turn. Deliveries for others go out as usual,
       but those for A will be discarded since A is "not running".
       This means that the call to B's boot() goes missing.

Using pending.for_myself.push() instead assures that B's boot will
always run at the end of A's turn, without regard for whether A is in
some terminated state.

I think that this kind of race could have happened before, but
something about switching away from shutdown() seems to trigger it
somewhat reliably.
2022-01-10 12:52:29 +01:00
Tony Garnock-Jones e06e5fef10 Put thread IDs in logging output 2022-01-10 12:52:12 +01:00
Tony Garnock-Jones c3a9525ef1 Track enough information to allow piecing-together of parent/child relationships among actors 2022-01-10 12:52:12 +01:00
Tony Garnock-Jones 58bde1e29d Add Activation::stop_root 2022-01-10 11:23:02 +01:00
Tony Garnock-Jones a6ea858f1c Belt and suspenders 2022-01-09 21:01:55 +01:00
Tony Garnock-Jones 55c3636ef2 Add x86_64-binary-debug target 2022-01-09 21:00:20 +01:00
Tony Garnock-Jones 76d4ffd8a2 (cargo-release) version 0.14.0 2022-01-08 16:05:47 +01:00
Tony Garnock-Jones 9f560b4dd0 (cargo-release) version 0.19.0 2022-01-08 16:05:47 +01:00
Tony Garnock-Jones fcb345dbaf (cargo-release) version 0.19.0 2022-01-08 16:05:47 +01:00
Tony Garnock-Jones 82ccbdb282 Simplify and correct facet stop logic; always run stop actions in parent facet context 2022-01-08 15:27:44 +01:00
Tony Garnock-Jones 0d25d76bec Split out (internal) on_facet_stop from on_stop 2022-01-08 15:26:34 +01:00
Tony Garnock-Jones 19b04b82a2 Improve documentation regarding stop/exit actions 2022-01-08 15:25:41 +01:00
Tony Garnock-Jones be27348d29 Activation::facet_ids 2022-01-08 15:24:10 +01:00
Tony Garnock-Jones 7524b634d3 Repair daemon service restarts 2022-01-08 13:54:25 +01:00
Tony Garnock-Jones 4eddcf7518 (cargo-release) version 0.13.0 2022-01-07 22:06:08 +01:00
Tony Garnock-Jones c29f46c117 (cargo-release) version 0.18.0 2022-01-07 22:06:08 +01:00
Tony Garnock-Jones ff827f9c38 (cargo-release) version 0.18.0 2022-01-07 22:06:08 +01:00
Tony Garnock-Jones 6f8fb014f2 Update daemon restart policy defaults to line up better with the new supervisor defaults 2022-01-07 22:05:12 +01:00
Tony Garnock-Jones 25e75324cf (cargo-release) version 0.17.0 2022-01-07 17:19:15 +01:00
Tony Garnock-Jones 02d832500f (cargo-release) version 0.12.0 2022-01-07 17:19:15 +01:00
Tony Garnock-Jones 5281da096c (cargo-release) version 0.17.0 2022-01-07 17:19:14 +01:00
Tony Garnock-Jones 41b1708cea Append a [] to config .pr files, for ergonomics of commenting (!) 2022-01-07 17:18:16 +01:00
Tony Garnock-Jones 895a2f676c lifecycle::terminate_on_service_restart; make debt reporter accept a parameter 2022-01-07 17:18:00 +01:00
Tony Garnock-Jones fce928b5b0 Warn on restart intensity excess 2022-01-07 17:16:20 +01:00
Tony Garnock-Jones 33a0a52d6b Change SupervisorConfiguration default to RestartPolicy::Always 2022-01-07 17:16:05 +01:00
Tony Garnock-Jones f956f3d994 Activation::every 2022-01-07 17:15:51 +01:00
Tony Garnock-Jones 1744a0a99a Update Makefile for latest preserves-schemac command line interface changes 2022-01-07 17:15:30 +01:00
Tony Garnock-Jones e92c2e6a7b `on_message!` macro, like `during!` 2022-01-07 17:15:03 +01:00
Tony Garnock-Jones ffcd851768 Merge latest changes from the syndicate-protocols repository 2022-01-07 15:29:32 +01:00
Tony Garnock-Jones e04b898c7f Adjustments to service.prs 2022-01-07 15:29:20 +01:00
Tony Garnock-Jones b465036773 (cargo-release) version 0.16.0 2021-12-13 20:35:43 +01:00
Tony Garnock-Jones 458c2795f9 (cargo-release) version 0.11.0 2021-12-13 20:35:43 +01:00
Tony Garnock-Jones 760314ee5e (cargo-release) version 0.16.0 2021-12-13 20:35:43 +01:00
Tony Garnock-Jones bbcc15c74d Fix length checks 2021-12-13 16:05:43 +01:00
Tony Garnock-Jones f5b1fec90f Follow simplifications to sturdy caveats 2021-12-13 16:00:25 +01:00
Tony Garnock-Jones 091ca088e0 Merge latest changes from the syndicate-protocols repository 2021-12-13 15:43:28 +01:00
Tony Garnock-Jones a831b02ca5 Accommodate changes to dataspacePatterns 2021-12-13 15:43:24 +01:00
Tony Garnock-Jones 5f60c22e49 More simplifications, to sturdy this time 2021-12-13 15:43:01 +01:00
Tony Garnock-Jones ea9e48cf31 Merge latest changes from the syndicate-protocols repository 2021-12-13 14:22:58 +01:00
Tony Garnock-Jones 49075e7e84 Embedded values count as atoms here 2021-12-13 14:22:32 +01:00
Tony Garnock-Jones aff9f46804 Merge latest changes from the syndicate-protocols repository 2021-12-13 13:50:23 +01:00
Tony Garnock-Jones b3e24d819c Experiment: stricter, simpler dataspacePatterns 2021-12-13 13:49:58 +01:00
Tony Garnock-Jones b2df99cbc0 New preserves-schemac invocation style 2021-12-13 13:44:02 +01:00
Tony Garnock-Jones 5f7d323af6 (cargo-release) version 0.15.1 2021-12-01 11:14:48 +01:00
Tony Garnock-Jones 07dacdc3be (cargo-release) version 0.10.1 2021-12-01 11:14:48 +01:00
Tony Garnock-Jones c7507e8730 (cargo-release) version 0.15.1 2021-12-01 11:14:48 +01:00
Tony Garnock-Jones 730fa2098b It is OK for an assertion to be placed at an unregistered remote_oid, it turns out 2021-12-01 11:14:02 +01:00