Skip to content

Stop adding the Corax search engine setting to existing databases - #6034

Open
ramonsmits wants to merge 1 commit into
masterfrom
search-engine-database-setting
Open

ramonsmits wants to merge 1 commit into
masterfrom
search-engine-database-setting

Conversation

@ramonsmits

@ramonsmits ramonsmits commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

UpdateDatabaseSettings added Indexing.Auto.SearchEngineType and Indexing.Static.SearchEngineType with value Corax to every database that had no such settings, at every start-up, including a start in maintenance mode. The intent was a one-time pin for databases created before 6.20. The code cannot tell "never pinned" from "the operator removed the setting", so it also undid an operator's choice.

RavenDB Studio removes a database setting whose value equals the server default. An operator who sets both keys to Lucene on a server whose default is Lucene therefore deletes the keys, and ServiceControl restored Corax at the next start. The "Migrating the whole database" procedure in the documentation produced exactly this.

The pin had no benefit. RavenDB stores the engine in each index and reads it back when the database opens, so a database default does not rebuild existing indexes. The default is used only for a new index, a reset, or a side-by-side replacement after a definition change.

  • Both DatabaseSetup classes no longer write the Corax settings. New databases are still created with Lucene.
  • DatabaseSettingsTests deletes the settings, reloads the database, runs the setup and asserts the settings stay absent.

Existing settings written by 6.20.0 to 6.21.2 are not removed; the next PR in the stack makes the engine of rebuilt indexes independent of them.

@ramonsmits
ramonsmits added this pull request to stack #6037 October 20, 2026 15:00
@ramonsmits
ramonsmits force-pushed the search-engine-database-setting branch from 55dd1fa to 1ab5c36 Compare October 20, 2026 15:02
@ramonsmits ramonsmits added the Bug label Oct 20, 2026
@ramonsmits
ramonsmits marked this pull request as ready for review October 21, 2026 08:21
mauroservienti added a commit that referenced this pull request Oct 21, 2026
Add an ADR for the decisions in #6034, #6035, #6036 and #6013: ServiceControl
no longer writes search engine settings to existing databases, picks the
engine of each new or rebuilt index, and reports and approves index
definition changes. Link it from the engineering context index.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants