Skip to content

Back EnabledEditions with a session Registry - #8956

Merged
robert3005 merged 1 commit into
developfrom
claude/arcswap-enabled-editions-8yi6tk
Jul 27, 2026
Merged

Back EnabledEditions with a session Registry#8956
robert3005 merged 1 commit into
developfrom
claude/arcswap-enabled-editions-8yi6tk

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Replace the RwLock-backed BTreeMap behind EnabledEditions with the shared
Registry<EditionId> used by the other session variables (array encodings, scalar functions,
layouts, dtypes), keyed by edition family.

Enabling an edition maps to Registry::register, which replaces the family's previous entry —
matching the "at most one edition per family" semantics directly. The family &'static str is
interned via Into<Id> only at enable time (a rare config-time write), so the disallowed
hot-path interning does not apply.

editions() no longer guarantees an ordering; the one test that asserted a specific order sorts
the result itself.

@joseph-isaacs
joseph-isaacs requested a review from 0ax1 July 24, 2026 16:06
@joseph-isaacs
joseph-isaacs marked this pull request as ready for review July 24, 2026 16:06
@joseph-isaacs joseph-isaacs added the changelog/performance A performance improvement label Jul 24, 2026
@joseph-isaacs
joseph-isaacs force-pushed the claude/arcswap-enabled-editions-8yi6tk branch from 0fc9544 to 45e8bf4 Compare July 24, 2026 16:09
@0ax1

0ax1 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

👀

@robert3005 robert3005 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.

I think you want #8919

@0ax1 0ax1 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.

Looks reasonable. In general, editions seem to be able to be a bit more dynamic than I thought they'd need to be. As in, my assumption would that editions are initialized at runtime once but then constant.

@joseph-isaacs
joseph-isaacs force-pushed the claude/arcswap-enabled-editions-8yi6tk branch from 45e8bf4 to 8021e73 Compare July 27, 2026 10:18
@joseph-isaacs joseph-isaacs changed the title Use ArcSwap for lock-free reads in EnabledEditions Back EnabledEditions with a session Registry Jul 27, 2026
Replace the Arc<RwLock<BTreeMap>> behind EnabledEditions with the shared
Registry<EditionId> used by the other session variables (array encodings,
scalar functions, layouts, dtypes), keyed by edition family. Enabling an
edition maps to Registry::register, which replaces the family's previous
entry, matching the "at most one edition per family" semantics. The family
&'static str is interned via Into<Id> only at enable time, a rare
config-time write, so the disallowed hot-path interning does not apply.

editions() no longer guarantees an ordering; the one test that asserted a
specific order sorts the result itself.

Signed-off-by: Joseph Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs
joseph-isaacs force-pushed the claude/arcswap-enabled-editions-8yi6tk branch from 8021e73 to cb0066c Compare July 27, 2026 10:19
@robert3005
robert3005 merged commit c543ad3 into develop Jul 27, 2026
73 checks passed
@robert3005
robert3005 deleted the claude/arcswap-enabled-editions-8yi6tk branch July 27, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants