Skip to content

Add opts.Events.AutoDiscoverTagTypes to turn off DCB tag type discovery - #5806

Merged
jeremydmiller merged 1 commit into
masterfrom
gh-5798-auto-discover-tag-types
Nov 2, 2026
Merged

jeremydmiller merged 1 commit into
masterfrom
gh-5798-auto-discover-tag-types

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Closes #5798. Thanks to @gschuager for the report and the design, credited as co-author.

An aggregate projection with a strong-typed identifier auto-registers that type as a DCB tag type. A store that doesn't use DCB still gets a table per identifier, with its foreign key and indexes and a parameter on mt_quick_append_events. The reporter hit ten empty tables moving from 8.38.1 to 9.50.3.

opts.Events.AutoDiscoverTagTypes = false;
  • It's on by default, so nothing changes for existing users.
  • Explicit RegisterTagType<T>() calls keep working with it off.
  • With it off, a tag query fails with the existing "is not registered" message.
  • It's a new member on IEventStoreOptions and EventGraph, with no existing signature changed. EventGraph is the only implementation in this repository.

Turning it off on an existing database does not drop tag tables already there. The docs say so.

Verified: with the guard removed, nothing_is_registered_or_built_when_auto_discovery_is_turned_off finds mt_event_tag_ticket_id in information_schema, read from the catalog rather than from configuration. With the guard in place, all 10 tests that ran in the class pass (2 of the 12 were skipped).

🤖 Generated with Claude Code

A store with strong-typed identifiers but no DCB still got a tag table per
identifier, with its foreign key and indexes and a parameter on
mt_quick_append_events. On by default so nothing changes for anyone else, and
explicit RegisterTagType calls work either way. Closes #5798.

Co-Authored-By: Germán Schuager <139658+gschuager@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Add an option to turn off automatic DCB tag type discovery

1 participant