GeezerVison is showing github.com — Add Azure Table journal storage provider by danielmeza · Pull Request #10254 · dotnet/orleans
Conversation
danielmeza
commented
Jul 7, 2026
•
edited by dotnet-policy-service
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Motivation
#10253 — replaying the append-blob WAL is paced per committed block by the Azure Storage service (~5.7 ms/block, reproducible with a raw curl and no Orleans involved), so grain recovery grows with journaled operation count: ~5.3 s for a ~1,000-op journal over a ~113 ms WAN link, while the same bytes read as a single-block blob in <200 ms. An Azure Table-backed journal replays via partition range queries (1,000 entities/page) at wire speed — the same journal replays in under 1 s on the same link in our benchmark.
Changes
New Table provider in Orleans.Journaling.AzureStorage, mirroring the blob provider's structure and discipline:
AzureTableJournalStorage: one partition per JournalId; a $header manifest row is the ETag fence and carries provider + caller metadata (caller keys in a JSON property, provider-owned keys preserved per the IJournalStorage contract). Data rows hold 64 KiB binary chunks (up to 15 properties/row).
AppendAsync = header merge + data rows in a single EGT (atomic; 412/409 → InconsistentStateException).
ReplaceAsync = new-generation rows written invisibly, then an ETag-guarded header flip, then best-effort cleanup of the old generation (orphans are unreachable via the header).
ReadAsync = header point-read + one bounded range query streamed to the consumer via JournalStorageConsumerExtensions; count/length validated against the header before any bytes are consumed (concurrent replace → InconsistentStateException).
- Metadata ops (
CreateIfNotExists/Get/UpdateMetadataAsync) with the same conditional semantics and metadata-only-conflict refresh loop as the blob provider.
AzureTableJournalStorageOptions (mirrors blob option names/defaults), provider + IJournalStorageCatalog, AddAzureTableJournalStorage(...) hosting overloads, "AzureTableStorage" provider builder under "GrainJournaling", per-op instruments, README section.
- API baseline regenerated with the repo's
GenAPIGenerateReferenceAssemblySource target.
Deliberate choices (feedback welcome)
- Generation stamp is a random GUID (doubles as the blob provider's recreation stamp; makes orphaned rows from a failed flip collision-proof) rather than a counter.
- Single-append cap is 2 MiB: Base64 inflation of binary properties inside the 4 MiB EGT payload limit.
- Compaction thresholds (
10,000 rows / 32 MiB) are judgment calls — the blob heuristic is driven by a hard block-count limit tables don't have; happy to adjust.
- Naming (
AddAzureTableJournalStorage, provider "AzureTableStorage", default table "journal") open to your preference.
Tests
AzureTableJournalStorageTests (BVT, 27 facts, in-memory Table fake with paging/filter/EGT semantics) and AzureTableCodecRecoveryTests (Functional vs Azurite, incl. binary→JSON format migration and a >1 MiB multi-row append).
- Full
Orleans.Journaling.Tests suite against Azurite: 377/377 passing on net8.0 and net10.0 — no regressions in the existing blob tests.
Addresses #10253.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ledjon-behluli reacted with heart emoji
Add an Azure Table-backed IJournalStorage to
Microsoft.Orleans.Journaling.AzureStorage as an alternative to the
append-blob provider. Each journal is one table partition: an
ETag-guarded header row holds the journal manifest (format, generation,
row/byte counts, caller metadata) and every append commits its 64 KiB
chunked data rows together with the header update in a single entity
group transaction. Recovery replays the current generation with a
single partition range query instead of a paced per-block download,
making replay latency independent of the number of journaled
operations.
ReplaceAsync writes the new generation's rows invisibly across as many
transactions as needed, then publishes them with an ETag-guarded header
flip. Generations use random identifiers so rows orphaned by a failed
flip can never collide with, or leak into, later generations; obsolete
generations are removed best-effort after the flip.
Addresses dotnet#10253.
Mirror the Azure Blob journal storage test suites for the table
provider: an in-memory TableClient fake covering append/replace/delete
round-trips, chunking across binary properties and rows, ETag fencing
between competing writers, metadata-only conflict refresh, generation
flips with orphan-row tolerance, and journal metadata operations, plus
Azurite-backed functional tests for durable-type recovery,
replace-and-append recovery across fresh provider instances,
binary-to-JSON format migration, and large multi-row appends.
Correct compaction accounting, stream recovery data, clean unpublished generations, preserve catalog identities with custom partition mappings, validate configuration, and retain compatibility with legacy headers.
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 9fe5acf1-653a-4fc9-bc1d-1920ed126475
Cover storage boundaries, corruption, concurrency, recovery, legacy schema migration, provider lifecycle, configuration, hosting registration, metrics, and codec behavior.
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 9fe5acf1-653a-4fc9-bc1d-1920ed126475
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thank you for doing this, @danielmeza, and thank you for the analysis! This looks good to me, and I just need to find time for a once-over before we merge it and release it. Are you using this provider already?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Thank you for doing this, @danielmeza, and thank you for the analysis! This looks good to me, and I just need to find time for a once-over before we merge it and release it. Are you using this provider already?
Hi Ruben, glad to help, thank you for you review and your feedback. Hope to keep contributing
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@danielmeza I performed some analysis regarding the blob latency claim. Here are the results:
In this case, the blob size is fixed at 512kb and the block size varies (512KB/NumBlocks), to show the overhead of block count on recovery latency.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ReubenBond
commented
Jul 31, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Here's a version with more data points and including Table Storage to show the trend:


|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 28, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|