Build: make JMH harness JDK 17-clean (module opens, configurable heap, failOnError)#17331
Build: make JMH harness JDK 17-clean (module opens, configurable heap, failOnError)#17331vaquarkhan wants to merge 1 commit into
Conversation
Add the --add-opens set Spark 4.x needs on JDK 17 (sun.util.calendar and others), make the JMH heap configurable via -PjmhHeap (default 32g), and make failOnError configurable via -PjmhFailOnError (default true). Without the opens the read-path benchmarks throw IllegalAccessException at warm-up; at 32g the full-scale PlanningBenchmark WithStats OOMs. Defaults preserved. Closes apache#17330
|
I hit this issue while running the Spark benchmarks on JDK 17 (Corretto 17.0.19). Every read-path benchmark I Once I added I also ran into the 32g heap limit on the full-scale On JDK 17 I confirmed Stack trace from the failing run (framework frames trimmed, marked with ...; otherwise verbatim)The failing run's VM options did not include |
What
Update
jmh.gradleso the benchmark suite runs on a clean JDK 17 checkout:--add-opensset Spark 4.x needs (sun.util.calendar, nio, security, concurrent)-PjmhHeap(default preserved at32g)failOnErrorconfigurable:-PjmhFailOnError(default preserved attrue)Why
On JDK 17 the read-path benchmarks throw
IllegalAccessException(sun.util.calendar) at warm-up, and the full-scalePlanningBenchmarkWithStats OOMs at 32g. Contributors currently cannot reproduce benchmarks without local edits. See #17330.Testing
./gradlew help,./gradlew spotlessApply,./gradlew :iceberg-core:jmhClassessucceed with the updated harness32g,failOnErrortrue unless-Pflags are passed--add-opensremain inert via-XX:+IgnoreUnrecognizedVMOptionsCloses #17330