compaction_jobs


Description

{“what”:“A record of a single compaction job execution attempt.”,“why”:“Tracks each compaction run to monitor progress, results, and failures.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.738565619+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 null
compaction_history.job_id compaction_history_job_id_fkey R
validation_verdicts.job_id validation_verdicts_job_id_fkey R

{“what”:“Unique identifier for the job, UUID format.”,“why”:“Uniquely references a job for updates, retries, and audit.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.753922561+00:00”}

session_id text 2147483647 null

{“what”:“Identifier of the session that submitted the job.”,“why”:“Groups jobs by originating session for per-session tracking.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.774947039+00:00”}

strategy text 2147483647 'parallel_block'::text

{“what”:“Compaction strategy name, e.g., ‘parallel_block’.”,“why”:“Determines which algorithm to run; missing it would make job execution ambiguous.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.811950527+00:00”}

status text 2147483647 'pending'::text

{“what”:“Current job state: pending, running, completed, failed, etc.”,“why”:“Drives job scheduler and retry logic; without it, job progress is unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.835103632+00:00”}

input_tokens int4 10 null

{“what”:“Number of tokens in the input data for this job.”,“why”:“Used to compute compression ratio and estimate resource usage.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.860347736+00:00”}

output_tokens int4 10 √ null

{“what”:“Number of tokens after compaction, set on completion.”,“why”:“Needed to calculate compression ratio and validate output size.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.873431922+00:00”}

block_count int4 10 √ null

{“what”:“Number of blocks processed in the compaction.”,“why”:“Provides granularity on job size and helps debug performance.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.892758138+00:00”}

compression_ratio float4 8,8 √ null

{“what”:“Ratio of input to output tokens (input/output).”,“why”:“Summarizes effectiveness of compaction; missing it hides job quality.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.907708673+00:00”}

latency_ms int4 10 √ null

{“what”:“Duration of the job in milliseconds.”,“why”:“Used for performance monitoring and SLA tracking.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.929670890+00:00”}

validation_status text 2147483647 √ null

{“what”:“Outcome of post-compaction validation, e.g., passed/failed.”,“why”:“Ensures output integrity; without it, corrupt results go undetected.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.944302600+00:00”}

error text 2147483647 √ null

{“what”:“Error message if the job failed.”,“why”:“Provides failure reason for debugging and alerting.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.957827534+00:00”}

created_at timestamptz 35,6 now()

{“what”:“Timestamp when the job was created.”,“why”:“Enables time-based ordering and retention policies.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.976914455+00:00”}

completed_at timestamptz 35,6 √ null

{“what”:“Timestamp when the job finished.”,“why”:“Measures job duration and identifies stuck jobs.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:26.987581464+00:00”}

device_id text 2147483647 √ null

{“what”:“Identifier of the device that executed the job.”,“why”:“Tracks which hardware ran the job for capacity planning.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:27.009520241+00:00”}

origin text 2147483647 √ null

{“what”:“Source of the job, e.g., API, scheduler.”,“why”:“Distinguishes job sources for auditing and throttling.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:27.021557104+00:00”}

window_tokens int4 10 √ null

{“what”:“Token count of the compaction window.”,“why”:“Defines the data window size; missing it makes job parameters unclear.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:27.035891028+00:00”}

threshold_tokens int4 10 √ null

{“what”:“Token threshold that triggers compaction.”,“why”:“Records the trigger condition to interpret job necessity.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:17:27.047605751+00:00”}

Indexes

Constraint Name Type Sort Column(s)
compaction_jobs_pkey Primary key Asc id
idx_jobs_created Performance Desc created_at
idx_jobs_origin Performance Asc origin
idx_jobs_session Performance Asc session_id
idx_jobs_session_status Performance Asc/Asc/Desc session_id + status + created_at

Relationships