Brick Work

0020. A bulk action is one batch that interactive work overtakes, tagged in the job payload

Context

After the 4.0 cutover, one Refresh pictures on prod made about 4,700 pipeline jobs. The drain ran them oldest first, so an Add queued during the refresh waited behind all of them, up to about 45 minutes for a new set's picture and price. Jobs showed thousands of rows for one action, and cancelling meant one job at a time.

Options considered

  1. A batch table: a new batch row with its own state, and jobs pointing to it. This means schema 4.2, an upgrade step and a migration of the API's job resources.
  2. A batch tag in the job's JSON payload (batch), with the drain choosing interactive jobs first and the Jobs page summing a batch from its jobs. No schema change.
  3. A priority column on job. This is also a schema change, and it says nothing about grouping or cancelling.

Recommendation: 2.

Decision

Consequences