Skip to content

Copy the event log and archived and resolved messages - #6237

Open
warwickschroeder wants to merge 4 commits into
migration-engine-9from
migration-engine-10
Open

warwickschroeder wants to merge 4 commits into
migration-engine-9from
migration-engine-10

Conversation

@warwickschroeder

Copy link
Copy Markdown
Contributor

The migration copies the last two optional categories: the event log, and the archived and resolved failed messages. Every optional category now copies only once ServicePulse starts it, which a later API will do. A windowed category copies only the items inside its window, and skips what SQL's retention sweep would delete straight away.

What this adds

  • An event log reader and writer. Items get new SQL ids, and an item with no category or event type, or one too long for its column, is skipped with its reason.
  • An archived and resolved failed message reader and writer, with bodies, reading through the same index trust as the other failed message categories.
  • A new Paused state lets ServicePulse stop an optional category for now. The copier and engine skip it, it is not finished, and resuming carries on from the cursor.
  • Docs: the system design page is replaced by the overview doc.

Tests

  • ServiceControl.UnitTests/Migration: the window reaching the reader, past-retention skips that neither halt nor fail a category, the gap warning, the Done percentage, CopiesFrom, a wake running another copier pass, a failed pass still answering the next wake, the offline command creating no optional row, the engine leaving a Paused row alone, a row resumed before it ran reading its window, and the status view's selection and Paused display.
  • ServiceControl.Persistence.Tests.RavenDB: both readers' windows, counts that match their reads with the index on and off, resuming past an expired cursor, edit lock and missing expiry flags, and refusing a window on a reader without one.
  • ServiceControl.Persistence.Tests: both writers skip what the sweeper would delete, the sweep removes what it should and nothing they copy, event log skip reasons, and the change log lines.
  • ServiceControl.Migration.AcceptanceTests: the host copies both categories in the background within their windows while the API answers, copies no optional category without a row, copies one started while it runs after a wake, keeps copying the others when one is abandoned mid-copy or its saves fail, leaves a paused category alone across a wake and finishes it from its cursor once resumed, keeps finished categories on restart, and copies 5,000 archived messages across batches. The tests run against SQL Server and PostgreSQL.
  • ServiceControl.Migration.Tests: SQL Server runs start a test container when no connection string is set.

warwickschroeder and others added 4 commits December 3, 2026 17:41
Keeps the system design page deleted, and passes AllowingAnUnreleasedMigration
in the acceptance tests this branch added or changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JdS5M7X7Wk25wdr7XwMRZ2
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.

1 participant