Repository navigation
Copy unresolved failed messages and their bodies to SQL - #6005
Open
warwickschroeder wants to merge 2 commits into
Open
warwickschroeder wants to merge 2 commits into
warwickschroeder wants to merge 2 commits into
Conversation
…andling for failure details without timestamps, and optimize SQL Server and PostgreSQL dialects for better performance.
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.
What this adds
The migration now copies unresolved and retry-issued failed messages, with their failure groups and bodies, from RavenDB to SQL Server or PostgreSQL while ServiceControl is closed. It does not copy archived or resolved messages yet, and a Release build still refuses to copy anything.
FailedMessagesReaderreads only unresolved messages through a RavenDB index, and reads the whole collection if the index can't be trusted.FailedMessagesWriterwrites one row per message, from its newest attempt, plus its failure groups.MigrationBodyLoaderreads them from RavenDB, and they are stored inline or externally by the same rule ingestion uses.SERVICECONTROL_MIGRATION_ALLOW_UNRELEASEDlets a Debug build copy for real for testing. This will be removed once the migration engine is ready for release.docs/migration/is updated to match.Tests
ServiceControl.UnitTests/Migration: body loading, stalls, refusal wording and the Debug switch.ServiceControl.Persistence.Tests/EFCore/Migration: mapping, skips, groups and bodies.ServiceControl.Persistence.Tests.RavenDB/DataMigration: reading through the index and the fallbacks, resuming, and body attachments.ServiceControl.Persistence.Tests.SqlServerand.PostgreSql: value length checks and the SQL Server insert.ServiceControl.Migration.AcceptanceTests: an end-to-end copy of failed messages and their bodies.