Scheduler Database

build requests

The buildrequests table in the schedulerdb is one of the core tables for buildbot. buildbot masters use this table to find new jobs to run (with get_unclaimed_buildrequests)

Column documentation:

  • buildername: this corresponds directly to the buildbot buildername.
    masters poll the table looking for pending jobs for builders they have enabled.
  • priority: this affects the order in which pending build requests are

    processed. See builderPriority


    Write up builder priority Include link to definitions, and intended usage.

  • claimed_at: this is a unix timestamp. masters update this field

    periodically as a job is running. It is not when the job starts. If a master dies or hangs, it will no longer be updating this field, and so other masters will be free to steal the job.

  • claimed_by_name: The master’s hostname and path that has this job

    claimed. This and claimed_by_incarnation are used to determine when requests can be stolen.

  • claimed_by_incarnation: The master’s process id and timestamp of when

    the process started. If a master sees requests that are claimed by itself (claimed_by_name), but a different claimed_by_incarnation, then it knows that it can immediately steal the request instead of waiting for the timeout.

  • complete: Set to 1 if the build is complete

  • results: The result code of the build. RETRY doesn’t appear here,

    rather the build is set as unclaimed again.

  • submitted_at: Timestamp when this request was submitted.

  • complete_at: Timestamp when this request finished.

pending jobs

Jobs are pending when they are marked as not complete in the DB, and no master currently has them claimed.

Treeherder fetches pending jobs from, which is populated from

running jobs

Jobs are running when they are currently claimed by a master and are running on a slave.

Treeherder fetches pending jobs from, which is populated from