Don't lock the BuildSteps table when inserting
[?]
Dec 7, 2017, 1:41 PM
XIFDDTXZZFGNUVXGHBW4FU4YYBFEMKLAYVRJ6HOPUHCDAF5HJFGACDependencies
- [2]
LVQXQIYAKill active build steps when builds are cancelled - [3]
NTEDD7T4Provide a plugin hook for when build steps finish - [4]
KBZHIGLGRecord the machine used for a build step - [5]
62MQPRXCPass null values to libpqxx properly - [6]
LJILHOJ7Create BuildSteps race-free - [7]
24BMQDZAStart of single-process hydra-queue-runner - [8]
MSIHMO45Tweak build steps - [9]
HUUZFPPKFix race between the queue monitor and the builder threads - [10]
VQISTKOPhydra-queue-runner: Use substitutes - [*]
UQQ4IL55Add a error type for "unsupported system type"
Change contents
- edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 283
/* Acquire an exclusive lock on BuildSteps to ensure that we don'trace with other threads creating a step of the same build. */txn.exec("lock table BuildSteps in exclusive mode"); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 291
restart: - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 294
txn.parameterized("insert into BuildSteps (build, stepnr, type, drvPath, busy, startTime, system, status, propagatedFrom, errorMsg, stopTime, machine) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)")auto r = txn.parameterized("insert into BuildSteps (build, stepnr, type, drvPath, busy, startTime, system, status, propagatedFrom, errorMsg, stopTime, machine) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) on conflict do nothing") - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 308[12.75][3.8996]
if (r.affected_rows() == 0) goto restart; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 341
restart: - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 344
txn.parameterized("insert into BuildSteps (build, stepnr, type, drvPath, busy, status, startTime, stopTime) values ($1, $2, $3, $4, $5, $6, $7, $8)")auto r = txn.parameterized("insert into BuildSteps (build, stepnr, type, drvPath, busy, status, startTime, stopTime) values ($1, $2, $3, $4, $5, $6, $7, $8) on conflict do nothing") - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 354
if (r.affected_rows() == 0) goto restart;