Repository navigation
Spike: check for RavenDB index rebuilds before an upgrade - #6165
Draft
ramonsmits wants to merge 1 commit into
Draft
ramonsmits wants to merge 1 commit into
ramonsmits wants to merge 1 commit into
Conversation
ServiceControl reports a changed index definition only at start-up, after the upgrade. This spike moves the check in front of the upgrade. Each RavenDB persister ships index-definitions.manifest, which holds the parts of every index definition that make RavenDB rebuild the index. A test keeps the manifest equal to the definitions in code. The installer engine embeds the manifest, reads the definitions from the running embedded RavenDB over HTTP, and compares them. ServiceControl Management asks for confirmation when an index changes. The PowerShell module stops the upgrade unless the caller passes -Acknowledgements RavenDBIndexRebuild. The check is skipped when the instance does not run, or uses an external RavenDB. The ADR for index rebuilds records this check as not pursued, so the ADR needs an update if the spike continues.
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.
ServiceControl reports a changed index definition only at start-up, after the upgrade. This spike moves the check in front of the upgrade, so the operator can cancel before RavenDB rebuilds a large index.
This is a spike to support the decisions below. It is not ready to merge.
What it does
index-definitions.manifest. It holds the parts of each index definition that make RavenDB rebuild the index: maps, reduce, fields, additional sources, and additional assemblies. A test fails when the manifest differs from the definitions in code.CanUpgradeInstance, before the instance stops, because the database answers only while the instance runs.-Acknowledgements RavenDBIndexRebuild.The comparison is plain JSON, so ServiceControl Management and the PowerShell module do not load the persister assembly or RavenDB.Client. The RavenDB persistence test projects compile the same file and run it against a real server. These tests cover that a normal deployment reports no change for every audit and primary index, and that a changed map is reported. Line endings are normalized, because the client renders a map with the line ending of its operating system.
Open decisions
-Forceis not available as the bypass, because on the upgrade cmdlets it means "replace the RavenDB 3.5 database".Known gaps
Conflict with an ADR
The RavenDB index search engine and rebuilds ADR records a pre-upgrade check in ServiceControl Management as not pursued, because that work shipped in a patch release. The ADR needs an update if this spike continues.
Docs
Reviewed
docs/README.md, the ADR above, anddocs/guidelines/database-schema-and-index-changes.md. Nodocs/page is updated, because this is a spike.Guidelines: none applies. No index definition, hosted service, service registration, or persistence operation changes.