Repository navigation
test(journaling): pin binary journal compatibility - #11466
ReubenBond wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The migration instructions reference an unspecified format-metadata mechanism instead of an actionable supported procedure.
1 open finding
What changed in this PR
Pins OrleansBinary journal compatibility across legacy V0 and released V1 formats.
Changes:
- Adds immutable V1 journal and append fixtures.
- Tests streaming recovery, appends, compaction, and metadata variants.
- Documents framing and migration requirements.
| File | Description |
|---|---|
test/Orleans.Journaling.Tests/UpstreamMainCompatibilityTests.cs |
Expands compatibility and recovery tests. |
test/Orleans.Journaling.Tests/fixtures/UpstreamMainCompatibilityTests.released-10.3.1-v1-journal.hex |
Adds released V1 journal fixture. |
test/Orleans.Journaling.Tests/fixtures/UpstreamMainCompatibilityTests.released-10.3.1-v1-append.hex |
Adds released V1 append fixture. |
src/Orleans.Journaling/README.md |
Clarifies format selection and migration. |
docs/site/src/content/docs/grains/journaling/runtime-behavior.md |
Documents binary framing contracts. |
docs/site/src/content/docs/grains/journaling/configuration.md |
Adds migration guidance. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| Providers expose the persisted format key as <xref:Orleans.Journaling.IJournalMetadata.FormatKey> and <xref:Orleans.Journaling.JournalMetadata.FormatKey>. Recovery selects the stored reader independently of the configured write format. When they differ, the next write creates a full snapshot using the configured format and updates the metadata. <xref:Orleans.Journaling.Json.JsonLinesJournalFormat.JournalFormatKey> supplies the JSON Lines format key. | ||
|
|
||
| When the stored format key is absent, recovery uses the configured format key. Configure `orleans-binary` to recover binary journals with missing format metadata. Before selecting a different write format, establish the stored key as `orleans-binary` using the provider's format-metadata mechanism and verify recovery. Back up the bytes and metadata together. |
Code coverage
Report-only conclusion: improved. The current-main baseline is commit Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |

OrleansBinary journals already persist two supported entry framings: legacy variable-length V0 entries with a command-format byte of
0, and fixed-width V1 entries with a framing marker of1. The releasedMicrosoft.Orleans.Journaling 10.3.1-alpha.1package and current main write V1 and recover both formats. Renumbering the fixed-width marker to0or removing the legacy reader would reject persisted history.Preserve the existing readers, markers, command discriminators, serialized operands, and codec snapshots. Add immutable hexadecimal fixtures emitted by the released 10.3.1 package, alongside the existing captured legacy journal. Extend recovery coverage across all seven durable types with present and absent format metadata, one-byte storage reads, byte-for-byte released-format appends, recovery of mixed V0/V1 journals, V1 compaction, and subsequent recovery.
Document the framing/codec contract and correct migration guidance: an absent stored format key selects the configured format, so binary journals with missing metadata are recovered with
orleans-binary. Establish the stored binary format key before switching the configured write format.This is an independent compatibility safeguard extracted from the journal-format review of #10693. It changes tests and documentation only; production formats and public APIs remain unchanged. The fixtures are pinned to their producing versions instead of being regenerated when current writers change.
Microsoft Reviewers: Open in CodeFlow