Repository navigation
Description
Release Baseline
All OM packages in this release will consistently require Orleans 10.4.0; the Journaling dependency is 10.4.0-alpha.1. Consumers must upgrade Orleans along with OM. This supersedes the earlier 10.3.1 runtime-compatibility requirement. Preserve persisted-data compatibility and recovery evidence. Optional #283/#284 remain deferred.
Problem
Orleans 10.4.0 ships Journaling as 10.4.0-alpha.1. This is a source migration, not just a package bump.
dotnet/orleans#11319 replaces IJournaledState with IStateMachine, renames AppendEntries/AppendSnapshot to WritePendingEntries/WriteSnapshot, removes the state deep-copy contract, and introduces grain-facing IDurableStateManager.GetOrAddState<TState> with AddStateMachine<TState,TImplementation> registration. OM's DurableOutbox<T>, DurableMessageTracker, MessagingJournalingExtensions, test session helpers, and documented constructor self-registration use the old contracts.
dotnet/orleans#11276 also permanently fences a manager after failed writes/deletes and requests deactivation. Recovery must use a fresh activation; OM tests currently retry a failed append using the same manager. #11279 enables composition from an ordinary Grain.
Work
- Migrate both custom state machines and their registration/access paths to the released contracts. Replace the old parameterless
AddJournalStorage()setup withAddJournaling(). Keep stable component names and one shared acknowledgement boundary with business state. - Handle open-generic
IDurableOutbox<T>registration using the supported manager/canonical lookup pattern; do not assume the closed genericAddStateMachine<TState,TImplementation>helper alone registers every payload type. Verify repeated registration and default-provider resolution. - Adapt the factory/session helpers and failure tests to terminal fencing and fresh-manager recovery. Preserve append baselines, snapshot acknowledgement, replayed identity/timestamps, tracker receipts, retention operations, and codec configuration.
- Preserve the ability to read journals written by the existing OM preview. Capture old-version fixtures before changing the implementation; document any unavoidable format restriction explicitly.
- Update the Journaling README, root README and API design examples with the tested 10.4 preview, state-manager composition, ordinary-Grain lifecycle setup, and recovery guidance. Explain any consumer registration changes in Beta API changes.
- Keep journaled messaging optional and independent of conventional
IStateManager<T>.
Acceptance
- Both components register once per stable name through supported 10.4 APIs; duplicate/incompatible names and late registration are exercised.
- Business state, receiver progress and outgoing messages recover together after one acknowledged write and after compaction.
- Failure before append, ambiguous failure after durable append, and failed snapshot/delete fence the original manager; fresh recovery reflects durable storage and does not invent rollback.
- Failed initial replay can be retried explicitly and serially on the same registered instances, as specified by dotnet/orleans#11326; this is distinct from terminal write/delete failure.
- Existing 10.3.1-alpha.1 OM journal fixtures replay without changing message identities, revisions, epochs, checkpoints or receipt retention.
- Executable ordinary-Grain and DurableGrain usage agrees with the revised documentation; relevant Release tests pass without warnings.
Coordinate with the Orleans 10.4 dependency upgrade #285 with all OM packages on the shared 10.4 release baseline.
Reviewed against OM source at 2b5d24614ff08a9028ebc61995308176dbb90841; current main at fcca835c3141ac32874c70f687583d2c49ae4847 differs only in OM's version file.
Activity
fix(om): migrate journaling to Orleans 10.4 state machines
docs(om): align journaling guidance with the Orleans 10.4 minimum