Infrastructure medium complexity backend
0
Dependencies
1
Dependents
3
Entities
0
Integrations

Description

Infrastructure utility that implements optimistic concurrency control for the approval workflow, preventing two coordinators from simultaneously approving or rejecting the same activity record. Uses a version column on the activity_approvals table and throws a conflict error if the version has changed since the client last read the record.

Feature: Activity Review & Approval

optimistic-lock-adapter

Responsibilities

  • Provide version-checked write operations for approval records
  • Detect and report concurrent modification conflicts
  • Expose retry guidance in conflict error responses

Interfaces

acquireLock(activityId, expectedVersion)
releaseLock(activityId)
checkVersion(activityId, clientVersion)
incrementVersion(activityId)

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component