Skip to main content

Data Integrity and Transactions

Summary

Local SaveChanges atomicity, multi-save workflows, external boundaries, and enforcement limits.

Audience

Backend engineers, database reviewers, architects, QA, support, operations, security reviewers, and product owners.

Overview

IUnitOfWork delegates to one PerformanceDbContext SaveChanges. EF Core provides a local transaction for each save; no explicit distributed transaction or cross-save transaction is implemented.

Confirmed persistence behavior

  • Canonical command saves include aggregate changes, children, audit, timeline, and newly mapped outbox records.
  • Foreign keys and cascade delete enforce Appraisal ownership of Goal and Review.
  • Most lifecycle, required-reference, and bounded-value rules are application/domain enforced rather than database constraints.
  • Workflow self submission can save locally, call Workflow externally, then save the Workflow reference in a second boundary.
  • Broker publication and Notification delivery occur after the originating save.
  • Compatibility save commits mapped aggregate plus audit/timeline in one save; delete commits removal plus audit.
  • Backfill saves one processed page at a time; tenant completion marking is a later separate save.
  • Development seeding uses several saves.
  • No concurrency token or distributed transaction is present.

Classification

Implemented local atomic saves with Transitional multi-boundary integrations.

Requires confirmation

Concurrency strategy, partial-failure recovery, cross-save reconciliation, transaction isolation, and compensating actions require confirmation.

Diagram

See Also

Keywords

  • Performance persistence
  • Data Integrity and Transactions
  • Draft database documentation

Source References

  • microservices/src/performance-service/Infrastructure/PerformanceDbContext.cs
  • microservices/src/performance-service/Infrastructure/Persistence.cs
  • microservices/src/performance-service/Application/Commands/AppraisalCommands.cs
  • microservices/src/performance-service/Application/Commands/ReviewCycleCommands.cs
  • microservices/src/performance-service/Application/Compatibility/PerformanceCompatService.cs
  • microservices/src/performance-service/Backfill/PerformanceGoalBackfill.cs

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-16
  • Review cycle: Quarterly