From 6307683a02610f13b8402be35f29c72afb2917af Mon Sep 17 00:00:00 2001 From: shuke <37901441+shuke987@users.noreply.github.com> Date: Mon, 26 Oct 2026 12:05:23 +0800 Subject: [PATCH] [chore](build) Raise threadpool header reach baseline to 1200 ### What problem does this PR solve? Issue Number: None Related PR: #69581 Problem Summary: The threadpool header reaches 1089 translation units on master c3c7af57fa4, exceeding the historical 988 baseline plus 10% (1087). Raise this baseline to 1200 to unblock builds with explicit growth headroom. The existing 10% allowance makes the new limit 1320. This deliberately relaxes one dependency budget without changing other checks or runtime code. Add an include-injection self-test proving threadpool reach is still bounded. ### Release note None ### Check List (For Author) - Test: build-support/check-build-hygiene.sh and build-support/tests/run.sh passed. - Behavior changed: Yes, the threadpool header reach limit increases to 1320 TUs. - Does this need documentation: No. --- build-support/check-header-deps.py | 2 +- build-support/tests/test-build-hygiene-header-deps.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build-support/check-header-deps.py b/build-support/check-header-deps.py index 8b2eb403755636..214b8d079c211d 100755 --- a/build-support/check-header-deps.py +++ b/build-support/check-header-deps.py @@ -587,7 +587,7 @@ "gen_cpp/Types_types.h": 1993, "gen_cpp/segment_v2.pb.h": 1234, "gen_cpp/PaloInternalService_types.h": 1133, - "util/threadpool.h": 988, + "util/threadpool.h": 1200, # parsed_page.h holds RleDecoder by value and constructs it in the # header, so the whole storage read stack sees the RLE machinery; a live # dependency, budgeted as-is (trimming it is a refactor, not a gate). diff --git a/build-support/tests/test-build-hygiene-header-deps.sh b/build-support/tests/test-build-hygiene-header-deps.sh index 6c0d1969b6d057..2c773adcae2ba7 100755 --- a/build-support/tests/test-build-hygiene-header-deps.sh +++ b/build-support/tests/test-build-hygiene-header-deps.sh @@ -127,6 +127,16 @@ echo "${OUT}" | grep -q -- "--reach runtime/workload_group/workload_group.h" \ || fail "reverse budget failure lacks the --reach fix pointer" cp "${BACKUP}/be/src/util/pretty_printer.h" "${ROOT}/be/src/util/pretty_printer.h" +# ---- RED: threadpool reach remains bounded after its baseline increase ---- +printf '#include "util/threadpool.h"\n' >> "${ROOT}/be/src/common/logging.h" +OUT="$(run_gate)"; EC=$? +[ "${EC}" -eq 1 ] || fail "threadpool reach injection expected exit 1, got ${EC}" +echo "${OUT}" | grep -q "util/threadpool.h now reaches" \ + || fail "threadpool reverse budget breach not reported" +echo "${OUT}" | grep -q -- "--reach util/threadpool.h" \ + || fail "threadpool reach failure lacks the --reach fix pointer" +cp "${BACKUP}/be/src/common/logging.h" "${ROOT}/be/src/common/logging.h" + # ---- RED: pch whitelist (quoted include added to pch.h) ---- printf '#include "common/logging.h"\n' >> "${ROOT}/be/src/pch/pch.h" OUT="$(run_gate)"; EC=$?