SyncOperationsTable
tableBreakdex::DataStores::SyncOperationsTable
Queue of pending and in-progress sync operations across all providers
Each row is a single sync task — upload, download, verify, or delete. Operations are queued, prioritized, and retried on failure. The sync engine processes this table as a work queue, advancing status from queued through in_progress to completed or failed. Priority and retry logic ensure important assets sync first and transient errors are tolerated.
Relationships
Depends On 1
sync_operations_dao
Reads From 3
asset_manifest_tablesync_providers_tableasset_copies_table
Breaks If 3
operation_type_enum_changesstatus_enum_changesprovider_id_fk_integrity
Data Access
Reads 3
asset_manifest_tablesync_providers_tableasset_copies_table
Answers
States
| State | Behavior |
|---|---|
| failed With Retries Remaining | message: Operation failed but retry_count < max_retries — will be retried automatically shows: retry_pending_indicator |
| in Progress | message: Actively transferring — bytes_transferred/total_bytes shows progress percentage shows: progress_bar |
| permanently Failed | message: retry_count >= max_retries — requires manual intervention or config fix shows: error_badge |
| queued | message: Operation waiting to be picked up by sync engine — ordered by priority shows: pending_in_queue |
Columns
| Name | Type | Constraints |
|---|---|---|
| id | text | NOT NULL |
| content_hash | text | NOT NULL |
| provider_id | text | NOT NULL |
| operation_type | text | NOT NULL ENUM: upload, download, verify, delete_remote |
| status | text | NOT NULL DEFAULT: queued ENUM: queued, in_progress, completed, failed |
| priority | int | NOT NULL DEFAULT: 0 |
| retry_count | int | NOT NULL DEFAULT: 0 |
| max_retries | int | NOT NULL DEFAULT: 3 |
| error_message | text | |
| bytes_transferred | int | NOT NULL DEFAULT: 0 |
| total_bytes | int | NOT NULL DEFAULT: 0 |
| created_at | datetime | NOT NULL DEFAULT: now |
| started_at | datetime | |
| completed_at | datetime |
Primary Key
idIndexes
idx_sync_operations_status
(status, priority)