* Hack around those SQLite timeouts: just retry the transaction.

[?]
Apr 22, 2009, 10:43 PM
LZO3C2KIACZ3HN72RBGWWIT5ED4RJMYKI3SAHXT6RIUPHDFL3STQC

Dependencies

  • [2] D7NXMCON * Doh.
  • [3] NI5BVF2V * In job inputs of type "build", allow the project and jobset names of
  • [4] BTOXLRG3 * Record the input containing the Nix expression (release.nix) in the
  • [5] 3BKF6P72 * Use Nix's negative caching.
  • [6] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [7] XNCWZ7OT * Get the job priority from the meta.schedulingPriority attribute.
  • [8] 7YBYT2LQ
  • [9] BDSD2JLV * Speed up manifest generation.
  • [10] 37R34XJO * Negative caching: don't perform a build if a dependency already
  • [11] CLJQCY2X * Store info about all the build actions and allow them to be
  • [12] TULPZ62Y * Perform builds in parallel.
  • [13] DQD7JMSU * Fix the terminology.
  • [14] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [15] NREF6YOA * Don't start more builds concurrently than allowed for each system
  • [16] L2E6EVE2 * Merged the Build and Job tables.
  • [17] 3E6IP3R3 * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
  • [18] H7CNGK4O * Log evaluation errors etc. in the DB.
  • [19] ZILILXXK * Allow scheduled builds to be cancelled. They're not removed from
  • [20] WM5WAST3 * Monitor for dead builds all the time.
  • [21] ZVTSOVHN * Support Subversion checkouts.
  • [22] 6BLUKEQ2 * Caching of "path" inputs, and fake a revision number for those.
  • [23] 2T42QGZD * Register builds as GC roots so they don't get deleted.
  • [24] POPU2ATH * hydra_scheduler: use eval-jobs.
  • [25] S5PV6IIM * Represent jobs explicitly in the DB.
  • [26] 3HZY24CX * Make jobsets viewable under
  • [27] ECBA3GQO * Make the schema class names match the case of the SQL table names.
  • [28] A63IHCMX * Register GC roots properly.
  • [29] CMU3YKOU * Store the release name.
  • [30] A52HEFHQ * Allow builds to be restarted (if they failed with a transient error,
  • [31] LQ5QEDVV
  • [32] FHF6IZJQ * Basic release management: releases are now dynamically computed as
  • [33] WHAFVCEI
  • [34] LQNBKF3D
  • [35] 5IK6NYKF
  • [36] NLJJZVHO * Use ->update({...}) properly.
  • [37] UWVMQIAC * Refactoring.
  • [38] AS5PAYLI
  • [39] 36TOESVE * When marking a build as "keep", register it as a root right away
  • [40] B72GLND4
  • [41] BVOPAMLS
  • [42] K3EAQY3X * Doh.
  • [43] G6HJY2V4
  • [44] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [45] G5A7TZVI * Don't discard old build steps when restarting a build.
  • [46] BHJ62LYE * Allow authorised users to create projects.
  • [47] X27GNHDV * Basic job info in the database.
  • [48] 5NO7NCKT * Refactoring.
  • [49] NEWDDAOF * Allow users to change the value of a build's "keep" flag, which
  • [50] IN272KZW * Automatically keep all builds in the latest successful release in
  • [51] M552HLIA * Support variant builds.
  • [52] FDE3BJAP * Refactoring.
  • [53] M57TEWF5 * Fixed a broken redirect when deleting a release set.
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] 2GK5DOU7 * Downloading closures.
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • replacement in src/lib/Hydra/Controller/Build.pm at line 276
    [7.354][7.354:396]()
    $c->model('DB')->schema->txn_do(sub {
    [7.354]
    [7.103]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Build.pm at line 307
    [7.619][7.619:661]()
    $c->model('DB')->schema->txn_do(sub {
    [7.619]
    [7.661]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Build.pm at line 343
    [7.379][7.379:421]()
    $c->model('DB')->schema->txn_do(sub {
    [7.379]
    [7.421]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 67
    [6.866][6.866:908]()
    $c->model('DB')->schema->txn_do(sub {
    [6.866]
    [6.908]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 82
    [6.1250][6.1250:1292]()
    $c->model('DB')->schema->txn_do(sub {
    [6.1250]
    [6.1292]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Project.pm at line 47
    [7.2361][7.2361:2403]()
    $c->model('DB')->schema->txn_do(sub {
    [7.2361]
    [7.834]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Project.pm at line 61
    [7.2766][7.2766:2808]()
    $c->model('DB')->schema->txn_do(sub {
    [7.2766]
    [7.936]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Project.pm at line 97
    [7.3258][7.3258:3300]()
    $c->model('DB')->schema->txn_do(sub {
    [7.3258]
    [7.3300]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Project.pm at line 130
    [6.5258][6.5258:5300]()
    $c->model('DB')->schema->txn_do(sub {
    [6.5258]
    [6.5300]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Root.pm at line 149
    [7.1288][7.1288:1338]()
    $c->model('DB')->schema->txn_do(sub {
    [7.1288]
    [7.1338]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Root.pm at line 156
    [7.42][7.42:92]()
    $c->model('DB')->schema->txn_do(sub {
    [7.42]
    [7.92]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Controller/Root.pm at line 184
    [7.2289][7.2289:2335]()
    $c->model('DB')->schema->txn_do(sub {
    [7.2289]
    [7.2335]
    txn_do($c->model('DB')->schema, sub {
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 11
    [7.30][7.30:74]()
    getHydraPath getHydraDBPath openHydraDB
    [7.30]
    [7.665]
    getHydraPath getHydraDBPath openHydraDB txn_do
  • edit in src/lib/Hydra/Helper/Nix.pm at line 81
    [7.53]
    [7.53]
    # Awful hack to handle timeouts in SQLite: just retry the transaction.
    # DBD::SQLite *has* a 30 second retry window, but apparently it
    # doesn't work.
    sub txn_do {
    my ($db, $coderef) = @_;
    while (1) {
    eval {
    $db->txn_do($coderef);
    };
    last if !$@;
    die $@ unless $@ =~ "database is locked";
    }
    }
  • replacement in src/script/hydra_build.pl at line 68
    [2.24][7.5462:5496](),[7.5462][7.5462:5496]()
    $db->txn_do(sub {
    [2.24]
    [7.4340]
    txn_do($db, sub {
  • replacement in src/script/hydra_build.pl at line 83
    [2.196][7.5984:6018](),[7.519][7.5984:6018](),[7.5984][7.5984:6018]()
    $db->txn_do(sub {
    [2.196]
    [2.197]
    txn_do($db, sub {
  • replacement in src/script/hydra_build.pl at line 95
    [5.271][7.6461:6495](),[7.628][7.6461:6495](),[7.3884][7.6461:6495](),[7.6461][7.6461:6495]()
    $db->txn_do(sub {
    [5.271]
    [7.347]
    txn_do($db, sub {
  • replacement in src/script/hydra_build.pl at line 122
    [7.764][7.764:798]()
    $db->txn_do(sub {
    [7.764]
    [7.4802]
    txn_do($db, sub {
  • replacement in src/script/hydra_build.pl at line 135
    [7.1280][7.1280:1314]()
    $db->txn_do(sub {
    [7.1280]
    [7.586]
    txn_do($db, sub {
  • replacement in src/script/hydra_build.pl at line 143
    [7.1765][7.1765:1799]()
    $db->txn_do(sub {
    [7.1765]
    [7.686]
    txn_do($db, sub {
  • replacement in src/script/hydra_build.pl at line 172
    [7.4021][7.4021:4043]()
    $db->txn_do(sub {
    [7.4021]
    [7.4982]
    txn_do($db, sub {
  • replacement in src/script/hydra_build.pl at line 268
    [7.7958][7.6940:6958](),[7.6940][7.6940:6958]()
    $db->txn_do(sub {
    [7.7958]
    [7.7991]
    txn_do($db, sub {
  • replacement in src/script/hydra_build.pl at line 290
    [7.7446][7.7446:7468]()
    $db->txn_do(sub {
    [7.7446]
    [7.936]
    txn_do($db, sub {
  • replacement in src/script/hydra_queue_runner.pl at line 22
    [7.76][7.72:94](),[7.72][7.72:94]()
    $db->txn_do(sub {
    [7.76]
    [7.77]
    txn_do($db, sub {
  • replacement in src/script/hydra_queue_runner.pl at line 57
    [7.8470][7.8470:8492]()
    $db->txn_do(sub {
    [7.8470]
    [7.22]
    txn_do($db, sub {
  • replacement in src/script/hydra_queue_runner.pl at line 126
    [7.9144][7.9144:9174]()
    $db->txn_do(sub {
    [7.9144]
    [7.1447]
    txn_do($db, sub {
  • replacement in src/script/hydra_scheduler.pl at line 114
    [7.3113][7.3113:3147]()
    $db->txn_do(sub {
    [7.3113]
    [7.5354]
    txn_do($db, sub {
  • replacement in src/script/hydra_scheduler.pl at line 125
    [7.3573][7.3573:3607]()
    $db->txn_do(sub {
    [7.3573]
    [7.1004]
    txn_do($db, sub {
  • replacement in src/script/hydra_scheduler.pl at line 173
    [7.4748][7.4748:4778]()
    $db->txn_do(sub {
    [7.4748]
    [7.5498]
    txn_do($db, sub {
  • replacement in src/script/hydra_scheduler.pl at line 263
    [7.225][7.9381:9403](),[7.1085][7.9381:9403]()
    $db->txn_do(sub {
    [7.225]
    [7.5149]
    txn_do($db, sub {
  • replacement in src/script/hydra_scheduler.pl at line 329
    [7.3030][7.3030:3056]()
    $db->txn_do(sub {
    [7.3030]
    [7.1067]
    txn_do($db, sub {
  • edit in src/script/hydra_scheduler.pl at line 373
    [7.2226][4.465:544]()
    die "not supported" if scalar @{$inputInfo->{$jobset->nixexprinput}} != 1;
  • edit in src/script/hydra_scheduler.pl at line 375
    [7.2372]
    [4.609]
    die "multiple alternatives for the input containing the Nix expression are not supported"
    if scalar @{$inputInfo->{$jobset->nixexprinput}} != 1;
  • replacement in src/script/hydra_scheduler.pl at line 406
    [7.6141][7.6141:6163]()
    $db->txn_do(sub {
    [7.6141]
    [3.1981]
    txn_do($db, sub {
  • replacement in src/script/hydra_scheduler.pl at line 452
    [3.2355][3.2355:2381]()
    $db->txn_do(sub {
    [3.2355]
    [3.2381]
    txn_do($db, sub {