forked from lix-project/lix
libstore: count all substitutions toward the same limit
limiting CA substitutions was a rather recent addition, and it used a
dedicated counter to not interfere with regular substitutions. though
this works fine it somewhat contradicts the documentation; job limits
should apply to all kinds of substitutions, or be one limit for each.
Change-Id: I1505105b14260ecc1784039b2cc4b7afcf9115c8
This commit is contained in:
parent
d9af753a7f
commit
d265dd5993
|
@ -41,13 +41,13 @@ void DrvOutputSubstitutionGoal::tryNext()
|
||||||
/* Make sure that we are allowed to start a substitution. Note that even
|
/* Make sure that we are allowed to start a substitution. Note that even
|
||||||
if maxSubstitutionJobs == 0, we still allow a substituter to run. This
|
if maxSubstitutionJobs == 0, we still allow a substituter to run. This
|
||||||
prevents infinite waiting. */
|
prevents infinite waiting. */
|
||||||
if (worker.runningCASubstitutions >= std::max(1U, settings.maxSubstitutionJobs.get())) {
|
if (worker.runningSubstitutions >= std::max(1U, settings.maxSubstitutionJobs.get())) {
|
||||||
worker.waitForBuildSlot(shared_from_this());
|
worker.waitForBuildSlot(shared_from_this());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
maintainRunningSubstitutions =
|
maintainRunningSubstitutions =
|
||||||
std::make_unique<MaintainCount<uint64_t>>(worker.runningCASubstitutions);
|
std::make_unique<MaintainCount<uint64_t>>(worker.runningSubstitutions);
|
||||||
|
|
||||||
if (subs.size() == 0) {
|
if (subs.size() == 0) {
|
||||||
/* None left. Terminate this goal and let someone else deal
|
/* None left. Terminate this goal and let someone else deal
|
||||||
|
|
|
@ -146,7 +146,6 @@ public:
|
||||||
uint64_t doneSubstitutions = 0;
|
uint64_t doneSubstitutions = 0;
|
||||||
uint64_t failedSubstitutions = 0;
|
uint64_t failedSubstitutions = 0;
|
||||||
uint64_t runningSubstitutions = 0;
|
uint64_t runningSubstitutions = 0;
|
||||||
uint64_t runningCASubstitutions = 0;
|
|
||||||
uint64_t expectedDownloadSize = 0;
|
uint64_t expectedDownloadSize = 0;
|
||||||
uint64_t doneDownloadSize = 0;
|
uint64_t doneDownloadSize = 0;
|
||||||
uint64_t expectedNarSize = 0;
|
uint64_t expectedNarSize = 0;
|
||||||
|
|
Loading…
Reference in a new issue