Skip to content

Implement Database Transaction Management for Critical Operations in the meridian-api folder #524

Description

@Qoder-Undefined

Description
Several critical operations within the API involve multiple database writes that execute independently. If one operation succeeds and another fails, the system may end up with partially persisted data, causing inconsistencies.

Examples may include:
User registration + profile creation
Property creation + metadata creation
Role assignment workflows
Payment or transaction processing
Multi-entity updates

The API should introduce proper transactional boundaries using TypeORM transactions.

Requirements
Identify services performing multiple write operations.
Use DataSource.transaction() or QueryRunner.
Ensure rollback when any operation fails.
Prevent partial writes.
Add logging for transaction failures.
Add tests covering rollback scenarios.
Acceptance Criteria
Critical operations execute atomically.
Database consistency is maintained.
Failed operations rollback completely.
Existing functionality remains unaffected.
Unit/integration tests are added.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions