Respect pre-set env vars and add cgroup memory detection in env scripts#17765
Respect pre-set env vars and add cgroup memory detection in env scripts#17765MileaRobertStefan wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Thanks for tackling this — JVM auto-sizing in containers reading host memory is a real and well-known footgun, and the cgroup v1/v2 dual handling here is the right shape. A few inline suggestions below; nothing blocking. Two file-level notes:
- No automated tests. Cgroup-gated shell behavior is awkward to unit-test, but a small harness that parameterizes the cgroup mount point (default
/sys/fs/cgroup) and runs the function against fixture files would catch regressions cheaply. Acceptable to skip given the PR description confirms manual cluster verification. - Duplication. The same ~17-line block is copy-pasted across
confignode-env.shanddatanode-env.sh. The existingcalculate_memory_sizes()is already duplicated in both files, so this is consistent with the current style — but a follow-up that sources a shared helper fromscripts/conf/iotdb-common.shwould reduce drift.
|
The two failing This PR only touches shell/bat scripts (no Java), but the two failures are in a Java pipe test — Root cause: the failing workflow run ( Fix: rebase this branch onto the latest |
Description
Adds cgroup v1/v2 memory detection.
This PR has:
for an unfamiliar reader.
for code coverage.