Skip to content

Implement message archive for EF persistence - #5691

Merged
rbev merged 13 commits into
masterfrom
rhys/sql-archive
Aug 6, 2026
Merged

Implement message archive for EF persistence#5691
rbev merged 13 commits into
masterfrom
rhys/sql-archive

Conversation

@rbev

@rbevrbev commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces new archive-related entities to the EF Core persistence layer for both PostgreSQL and SQL Server, and updates the corresponding migration and model snapshot files. The main changes involve adding the ArchiveOperationEntity and related tables, as well as updating or removing some fields and indexes to support new archiving and retry features.

Key changes:

Archive and Retry Feature Additions

  • Added the ArchiveOperationEntity and corresponding archive_operations table with fields for tracking archive operations, including batch and message counts, group info, and initiator details. [1][2][3]

Schema and Index Updates

  • Added a composite index on Type and GroupId for the failed_message_groups table to optimize queries.

Migration and Model Maintenance

  • Removed the migration for custom checks as it was accidentally pruned from the model snapshot in an earlier PR, it is included in the migration for this PR instead to align the model snapshot correctly. [1][2][3]
  • Updated the model snapshot to include all new entities and schema changes.

@rbevrbev changed the title Implement message archive for SQL persistenceImplement message archive for EF persistenceAug 4, 2026
@rbev
rbev marked this pull request as ready for review August 4, 2026 05:46

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the migration here shows up as a move in this PR because I had to delete the previous one that was not included in the snapshot for the migration that followed it. Deleting it and including it in this migration was the simplest path to making them consistent.

Comment threadsrc/ServiceControl.Persistence.EFCore/Abstractions/BasePersistence.cs Outdated
Comment threadsrc/ServiceControl.Persistence.EFCore/Entities/ArchiveOperationEntity.cs Outdated
Comment threadsrc/ServiceControl.Persistence.EFCore/Entities/ArchiveOperationEntity.cs Outdated
@rbev
rbev merged commit bc7ae8e into masterAug 6, 2026
37 checks passed
@rbev
rbev deleted the rhys/sql-archive branch August 6, 2026 08:01
Sign up for freeto 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.

3 participants

@rbev@johnsimons@warwickschroeder