Skip to content

Implement message archive for EF persistence - #5691

Open
rbev wants to merge 10 commits into
masterfrom
rhys/sql-archive
Open

Implement message archive for EF persistence#5691
rbev wants to merge 10 commits into
masterfrom
rhys/sql-archive

Conversation

@rbev

@rbev rbev 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.

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

Copy link
Copy Markdown
Contributor Author

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 thread src/ServiceControl.Persistence.EFCore/Abstractions/BasePersistence.cs Outdated
Comment thread src/ServiceControl.Persistence.EFCore/Entities/ArchiveOperationEntity.cs Outdated
Comment thread src/ServiceControl.Persistence.EFCore/Entities/ArchiveOperationEntity.cs Outdated
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.

2 participants