feat: add a jemalloc Maven profile to build Comet with the jemalloc allocator #7356
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.42) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 322 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.346
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #7356"
general
weight: 0.35
andygrove
Which issue does this PR close?
Related to #7344 and #7108. Both stay open.
Rationale for this change
glibc keeps freed native memory resident in long-running executors (#7108). The
jemallocCargo feature exists, but there is no documented way to build Comet with it and no CI run that tests it, so it cannot easily be compared with glibc (#7344). This PR adds ajemallocMaven profile that builds Comet with jemalloc. The published jars are unchanged and keep the system allocator.What changes are included in this PR?
jemallocprofile in the rootpom.xml. Maven does not build the native library, somakeadds thejemallocCargo feature wheneverPROFILESnames the profile, for examplemake release PROFILES="-Pspark-4.1 -Pjemalloc".make release-nogitnow passesCOMET_FEATUREStoo.comet.jemalloc=trueto the tests, and a test inCometSparkSessionExtensionsSuitechecks that the loaded native library uses jemalloc.NativeBaselogs which allocator the loaded library uses.run-jemalloc-testslabel builds the pull request's native library with jemalloc and runs its Linux suites with-Pjemalloc, for pull requests intomainonly. Every other run tests the default build._RJEM_MALLOC_CONFand 64 KiB-page arm64 kernels.How are these changes tested?
The new test fails a
-Pjemallocbuild whose native library does not use jemalloc, and therun-jemalloc-testslabel runs it in CI. Checked locally: the offline compile with-Pjemalloc, spotless and scalastyle, the Spark 3.5 strict warnings build,dev/ci/check-ci-config.py, actionlint, andmake -n.