-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Journaling] Auto-retire & purge state machines #9684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ReubenBond
merged 36 commits into
dotnet:main
from
ledjon-behluli:retire-state-machines
Oct 31, 2025
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
9a967f5
retire and purge state machines
ledjon-behluli 86cea82
Update src/Orleans.Journaling/StateMachineManager.cs
ledjon-behluli 5a48051
move comments up
ledjon-behluli b64b9a8
wip
ledjon-behluli 699dca2
time-based retirement logic
ledjon-behluli 35e531b
merge
ledjon-behluli 15213bd
last touches
ledjon-behluli 6cc1612
remove test project
ledjon-behluli fbbd90a
remove unused usings
ledjon-behluli cbe7fde
prevent duplicate key error during state machine resurrection
ledjon-behluli 14ea39a
ensure buffered data is re-applied if machine comes back
ledjon-behluli c45cc71
remove hacky assertion in tests
ledjon-behluli 8419cdb
Update src/Orleans.Journaling/StateMachineManager.cs
ledjon-behluli dd396e0
Update src/Orleans.Journaling/StateMachineManager.cs
ledjon-behluli 37dab7f
Update test/Orleans.Journaling.Tests/StateMachineManagerTests.cs
ledjon-behluli fdd14e6
Update test/Orleans.Journaling.Tests/StateMachineManagerTests.cs
ledjon-behluli 3de46b7
Update test/Orleans.Journaling.Tests/StateMachineManagerTests.cs
ledjon-behluli 40ce19c
Fix table creation logging to reflect existing tables correctly (#9696)
egil 75e7916
Fix ZooKeeper CI tests: correct service name and use official Docker …
Copilot 167d225
Fix Consul CI tests by using compatible Consul version (#9701)
Copilot e7c922d
Remove explicit ActivityStatusCode.Ok setting to comply with OpenTele…
Copilot b91aeee
chore(deps): bump dotnet-sdk from 9.0.303 to 9.0.305 (#9677)
dependabot[bot] 2a917e0
Fix race condition in `TransactionInfo.Fork` `PendingCalls` increment…
bknote71 8ea8f8f
[FIX] Potential NRE in the activation repartitioner (#9713)
ledjon-behluli 2495095
Remove infinite timespan reminder checks (#9715)
Da-Teach 53b8678
ResponseCompletionSource: RunContinuationsAsynchronously (#9724)
ReubenBond c0c11fb
chore(deps): bump dotnet-sdk from 9.0.305 to 9.0.306 (#9720)
dependabot[bot] 2f389d8
Add `BigInteger` codec (#9669)
galvesribeiro a226ad5
StateMachineManager: start work loop during activation (#9725)
ReubenBond e256d97
Flag PostgreSQL as asynchronous (#9705)
hiyelbaz f9eb0c7
Enable GitHub merge queue (#9727)
ReubenBond 8621812
Add missing validation for the NATS stream provider (#9668)
galvesribeiro 420da38
`ActivationDataActivatorProvider`: run grain constructor on grain sch…
ReubenBond 3847b58
Modifying Endpoint to use Pascale Casing as EndPoint for consistency …
ramzimort ac665c5
treat retirement tracker as a first-class (internal) machine
ledjon-behluli 2cc6ffd
Merge branch 'main' into retire-state-machines
ledjon-behluli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| namespace Orleans.Journaling; | ||
|
|
||
| /// <summary> | ||
| /// Options to configure the <see cref="IStateMachineManager"/>. | ||
| /// </summary> | ||
| public sealed class StateMachineManagerOptions | ||
| { | ||
| /// <summary> | ||
| /// Specifies the period of time to wait until the manager retires | ||
| /// a <see cref="IDurableStateMachine"/> if its not registered in the manager anymore. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// <para>The act of retirement removes this state machine from the log.</para> | ||
| /// <para>If the state machine is reintroduced (within the grace period), than it will not be removed by the manager.</para> | ||
| /// <para> | ||
| /// This value represents the <b>minimum</b> time the fate of the state machine will be postponed. | ||
| /// The final decision can take longer - usually <see cref="RetirementGracePeriod"/> + [time until next compaction occurs]. | ||
| /// </para> | ||
| /// </remarks> | ||
| public TimeSpan RetirementGracePeriod { get; set; } = DEFAULT_RETIREMENT_GRACE_PERIOD; | ||
|
|
||
| /// <summary> | ||
| /// The default value of <see cref="RetirementGracePeriod"/>. | ||
| /// </summary> | ||
| public static readonly TimeSpan DEFAULT_RETIREMENT_GRACE_PERIOD = TimeSpan.FromDays(7); | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.