diff options
author | eldritch horrors <pennae@lix.systems> | 2024-07-25 18:05:42 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-07-30 15:37:27 +0000 |
commit | d265dd5993a9b6067bc20995946573e11c29573a (patch) | |
tree | 4a23d00c9190f6043f5e9b07704cb159b0f13c13 /src | |
parent | d9af753a7f5f6c7e52582b596b78c9b870572cb6 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build/drv-output-substitution-goal.cc | 4 | ||||
-rw-r--r-- | src/libstore/build/worker.hh | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libstore/build/drv-output-substitution-goal.cc b/src/libstore/build/drv-output-substitution-goal.cc index 5e83d769c..94c9206a3 100644 --- a/src/libstore/build/drv-output-substitution-goal.cc +++ b/src/libstore/build/drv-output-substitution-goal.cc @@ -41,13 +41,13 @@ void DrvOutputSubstitutionGoal::tryNext() /* Make sure that we are allowed to start a substitution. Note that even if maxSubstitutionJobs == 0, we still allow a substituter to run. This 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()); return; } maintainRunningSubstitutions = - std::make_unique<MaintainCount<uint64_t>>(worker.runningCASubstitutions); + std::make_unique<MaintainCount<uint64_t>>(worker.runningSubstitutions); if (subs.size() == 0) { /* None left. Terminate this goal and let someone else deal diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh index eee47e23d..3984c9c1c 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/build/worker.hh @@ -146,7 +146,6 @@ public: uint64_t doneSubstitutions = 0; uint64_t failedSubstitutions = 0; uint64_t runningSubstitutions = 0; - uint64_t runningCASubstitutions = 0; uint64_t expectedDownloadSize = 0; uint64_t doneDownloadSize = 0; uint64_t expectedNarSize = 0; |