Start steps in order of ascending build ID

This commit is contained in:
Eelco Dolstra
2015-08-10 14:50:22 +02:00
parent 52ec971154
commit 27182c7c1d
4 changed files with 85 additions and 23 deletions

View File

@ -228,6 +228,14 @@ void State::getQueuedBuilds(Connection & conn, std::shared_ptr<StoreAPI> store,
throw;
}
/* Update the lowest build ID field of each dependency. This
is used by the dispatcher to start steps in order of build
ID. */
visitDependencies([&](const Step::ptr & step) {
auto step_(step->state.lock());
step_->lowestBuildID = std::min(step_->lowestBuildID, build->id);
}, build->toplevel);
/* Add the new runnable build steps to runnable and wake up
the builder threads. */
printMsg(lvlChatty, format("got %1% new runnable steps from %2% new builds") % newRunnable.size() % nrAdded);