Use Lucene search engine for new RavenDB databases and flag indexes still on Corax - #5833
Draft
ramonsmits wants to merge 4 commits into
Draft
Use Lucene search engine for new RavenDB databases and flag indexes still on Corax#5833ramonsmits wants to merge 4 commits into
ramonsmits wants to merge 4 commits into
Conversation
New databases are created with Indexing.Static/Auto.SearchEngineType=Lucene: Lucene indexes are smaller, use less memory and are faster for the index definitions ServiceControl uses. Existing databases keep the engine they currently have configured, so no full index rebuild is triggered on upgrade.
New databases use Lucene, existing databases keep their configured search engine. Operators of existing databases now get a WARN at startup listing the indexes still on Corax so they can plan the transition to Lucene.
Surfaces the same information as the startup warning in ServicePulse via a custom check on both the Primary (main + throughput database) and Audit instances, so operators see it without inspecting logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Load testing showed that Lucene indexes are smaller, use less RAM and are faster than Corax for the index definitions ServiceControl uses. This PR moves new databases to Lucene while leaving existing databases untouched, and makes it visible to operators when their indexes are still on Corax.
Switching an existing database is deliberately not done automatically: changing the search engine triggers a full rebuild of all indexes, which on very large databases can take days depending on available compute and degrades ingestion/indexing rates while it runs. Migration remains an operator decision (docs guidance to follow).
Changes
Indexing.Static/Auto.SearchEngineType=Lucene(Primary main + throughput databases, Audit).UpdateDatabaseSettingsis unchanged, so existing databases keep whatever engine they currently have configured.StartupChecks.WarnIfIndexesUseCorax, shared by both persisters).Error Database Search Engine/Audit Database Search Enginesurfacing the same information in ServicePulse (hourly).