Skip to content

fix(streaming): use a unique Event Hubs block pool ID - #11592

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
zbarrier:fix/eventhub-blockpool-id
Oct 27, 2026
Merged

ReubenBond merged 2 commits into
dotnet:mainfrom
zbarrier:fix/eventhub-blockpool-id

Conversation

@zbarrier

@zbarrier zbarrier commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Event Hubs cache factories currently use an all-zero GUID in their shared block pool IDs. Factories targeting the same Event Hub path therefore report block pool metrics with identical Path and ObjectPoolId tags.

Solution

Generate a unique ID when each factory creates its shared pool, matching the memory and generator stream providers. Each named stream provider retains one adapter and cache factory per silo; partitions and recreated caches reuse that factory's pool and ID. This gives each configured pool distinct metric attribution with stable cardinality throughout its lifetime.

Add a focused regression test proving that separate factories for the same hub receive distinct pool IDs and that partitions and replacement caches reuse their factory's ID.

Microsoft Reviewers: Open in CodeFlow

@zbarrier
zbarrier requested a review from ReubenBond as a code owner October 27, 2026 14:55
Copilot AI balanced review requested due to automatic review settings October 27, 2026 14:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the Event Hubs block-pool metric identification change.

No open issues 🎉

What changed in this PR

Fixes Event Hubs block-pool metric identification so separate factories using the same Event Hub path no longer share an all-zero pool ID.

Changes:

  • Replaces new Guid() with Guid.NewGuid() to generate a unique ID for each factory’s shared pool.
  • Preserves the ID format without changing public APIs, caching, or serialization.
File Description
src/​Azure/​Orleans.Streaming.EventHubs/​Providers/​Streams/​EventHub/​EventHubQueueCacheFactory.cs Generates a unique block-pool ID for metric attribution.

Review effort: Balanced

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 84.00% (120,580 / 143,554)
Branches 73.81% (36,116 / 48,934)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested d1f2a16, not current main 9b5356e.

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

@ReubenBond ReubenBond changed the title Fix EventHub block pool ID always using Guid.Empty fix(streaming): use a unique Event Hubs block pool ID Oct 27, 2026
@ReubenBond
ReubenBond force-pushed the fix/eventhub-blockpool-id branch from 7eb2730 to e4252ab Compare October 27, 2026 20:43
Copilot AI balanced review requested due to automatic review settings October 27, 2026 20:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The localized fix preserves pool lifetime behavior, and the regression test covers ID uniqueness and reuse.

No open issues 🎉

Review effort: Balanced

@zbarrier

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

@ReubenBond

Copy link
Copy Markdown
Member

This looks like a good/appropriate PR, @zbarrier. Thanks for opening it! Why did you close it?

@ReubenBond ReubenBond reopened this Oct 27, 2026
@ReubenBond

Copy link
Copy Markdown
Member

@zbarrier, it looks like this was closed while the CLA was being signed, so we have reopened it. Could you confirm that you would like us to keep it open? We are planning to include the fix in 11.0.0-preview.1 and 10.4.1. Thanks!

@zbarrier

zbarrier commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

It was an accident, I didn't mean to close it. I would like to keep it open. Thanks!

@ReubenBond

Copy link
Copy Markdown
Member

Great, I will merge it soon! Thanks again

ReubenBond pushed a commit to ReubenBond/orleans that referenced this pull request Oct 27, 2026
Backport the implementation from dotnet#11592 to 10.x.

(cherry picked from commit 7eb2730)
@ReubenBond
ReubenBond merged commit 68ce07f into dotnet:main Oct 27, 2026
184 of 186 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants