Repository navigation
Conversation
4 of 5 tasks
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 16:38
ebb5863 to
ef9c0a8
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 16:40
ef9c0a8 to
d46adf2
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 16:53
d46adf2 to
cc4d8cc
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 17:09
cc4d8cc to
d657891
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 17:14
d657891 to
3e41947
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 17:22
3e41947 to
3edd2ee
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 17:33
3edd2ee to
aae543d
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 17:42
aae543d to
50bbc98
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 18:04
50bbc98 to
a14c4ed
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 18:20
a14c4ed to
90bcbfb
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
3 times, most recently
from
November 5, 2026 20:10
c1ea314 to
e8c7bf8
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 20:23
e8c7bf8 to
3db1a7b
Compare
reka18
force-pushed
the
fix/durable-effect-dispatch
branch
from
November 5, 2026 21:02
3db1a7b to
7427624
Compare
Contributor
Author
|
Review results. One reviewer per dimension, each reading the others' findings. All seven dimensions have zero blockers on the latest round. Fixed along the way: For a maintainer: questions 3 and 4 on #214 still need a ruling. The description says where this PR departs from the proposed answers. |
This was referenced Nov 9, 2026
Only Fire dispatched domain effects. Every step path now commits through one helper that appends, dispatches, then checkpoints. A failed dispatch fails the Handle before its checkpoint, so a later checkpoint can't compact the effect away, and Recover retries it. Start applies the initial entry's effects before the baseline, so a handler failure leaves no instance. EffectInstance gives a handler its instance id, and state.ServiceRunner gains WithResultTransform so a service's result reaches the machine in the form a replay supplies. Effects from a parent transition an actor drives are still not dispatched. Relates to #214. Signed-off-by: Ray Karnes <ray.karnes@stablekernel.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this change does
Domain effects now reach the handler from
Start,TickandRunService, not onlyFire. Stacked on #234.commitStep: append, dispatch, then checkpoint.Recoverretries the effect, and fails withErrEffectDispatchwhile the handler still does. This changes behavior: aFireafter a failed dispatch used to be accepted.Startencodes the baseline, applies the initial entry's effects, then writes the baseline, and applies none if the entry failed. Those effects are at-least-once: a handler failure, a failed baseline write or overlappingStartcalls re-apply them. Nothing can re-derive them after the baseline.durable.EffectInstance(ctx)gives a handler the instance, because effect ids repeat across instances (durable: defects found in the platform-redesign review #214 question 5). The proposed answer was to add the instance to the effect id. This takes the issue's other option and passes the instance to the handler, so the dispatched set needs no migration.state.ServiceRunner.WithResultTransform, an additive change to the frozenstatemodule.durableuses it so a service result reachesAssignin its decoded form live as well as on replay. Without it, a retried effect could differ from the first attempt under the same id.KindedEffectthat can't marshal now failsTickandRunService, as it already failedFire, even with no handler wired.Please check these:
Recoverfails while the handler is down. A handler that always refuses an effect wedges the instance. This needs a ruling.DispatchStorestill silently applies nothing, now on four paths instead of one. The proposed answer is to refuse the configuration.Fire, aren't dispatched.ActorSystemdrops those results, so this needs astatechange. durable: defects found in the platform-redesign review #214 lists it.Assignsees: a struct arrives as a map, an integer as afloat64that loses precision above 2^53, and an error loses its type. The journal records the decoded value.errors.Is.Recoverof an older journal applies effects from uncompactedTickand service steps, which were never dispatched.MarkDispatchedfails the Handle, andRecoverapplies that effect again.Why
Effects from entry, timer and service transitions never reached the handler, and a failed effect could be compacted away and never retried.
Relates to: #214
Evidence
On
GOTOOLCHAIN=go1.27.3, indurableunless the row says otherwise:go test .instateWithResultTransform;durableexercises itgo test ./...TestRunner_EffectDispatch_Start_AppliesEntryEffect,_TimerTransition_AppliesEffect,_ServiceSettle_AppliesEffectand_FailedThenCheckpointed_AppliedOnceChecklist
git commit -s) per the DCOtype: subject)mage checkpasses locally (lint + race tests + govulncheck): not run as a whole