Skip to content

[CORE] Fix GlutenConfig runtime modifiability#12036

Open
malinjawi wants to merge 5 commits intoapache:mainfrom
malinjawi:fix/11998-gluten-config-modifiable
Open

[CORE] Fix GlutenConfig runtime modifiability#12036
malinjawi wants to merge 5 commits intoapache:mainfrom
malinjawi:fix/11998-gluten-config-modifiable

Conversation

@malinjawi
Copy link
Copy Markdown
Contributor

@malinjawi malinjawi commented May 4, 2026

What changes are proposed in this pull request?

This PR fixes GlutenConfig runtime modifiability reporting for #11998.

GlutenConfig.get previously constructed GlutenConfig from SQLConf.get, the JVM thread-local SQLConf. Spark treats configs stored only in that static/thread-local SQLConf path as non-modifiable, so spark.conf.isModifiable("spark.gluten.*") could report false even for Gluten configs that are not static.

Main changes:

  • register Gluten config entries with Spark SQLConf metadata
  • preserve static Gluten config behavior by registering static configs through SQLConf.buildStaticConf
  • register config alternatives as SQLConf entries as well
  • update GlutenCoreConfig.get and GlutenConfig.get to read the active SparkSession SQLConf before falling back to SQLConf.get
  • add focused runtime config coverage for the exact SparkSession API path: spark.conf.isModifiable(...)
  • add focused runtime config coverage proving GlutenConfig.get reads active SparkSession config changes

Fixes #11998.

How was this patch tested?

Focused runtime config suites:

  • ./dev/run-scala-test.sh -Pjava-17,spark-4.0,scala-2.13,backends-velox,hadoop-3.3,spark-ut -pl gluten-ut/spark40 -s org.apache.spark.sql.GlutenRuntimeConfigSuite
  • ./dev/run-scala-test.sh -Pjava-17,spark-4.1,scala-2.13,backends-velox,hadoop-3.3,spark-ut -pl gluten-ut/spark41 -s org.apache.spark.sql.GlutenRuntimeConfigSuite

Also checked:

  • git diff --check

Was this patch authored or co-authored using generative AI tooling?

Generated-by: IBM BOB

@github-actions github-actions Bot added the CORE works for Gluten Core label May 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Run Gluten Clickhouse CI on x86

@philo-he philo-he changed the title [VL] Fix GlutenConfig runtime modifiability [CORE] Fix GlutenConfig runtime modifiability May 4, 2026
@philo-he philo-he self-requested a review May 4, 2026 16:58
@FelixYBW
Copy link
Copy Markdown
Contributor

FelixYBW commented May 4, 2026

@malinjawi thank you for the PR. Can you add one column to https://github.com/apache/gluten/blob/main/docs/velox-configuration.md and mark each config as static (⚓) or dynamic (🔄)?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Run Gluten Clickhouse CI on x86

@malinjawi malinjawi force-pushed the fix/11998-gluten-config-modifiable branch from 116ad3c to b6c19f6 Compare May 5, 2026 13:19
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Run Gluten Clickhouse CI on x86

@FelixYBW
Copy link
Copy Markdown
Contributor

FelixYBW commented May 5, 2026

thank you, @malinjawi. Can you fix Configuration.md as well? our config file is automatically created. Can you change the script instead?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Run Gluten Clickhouse CI on x86

@malinjawi
Copy link
Copy Markdown
Contributor Author

malinjawi commented May 7, 2026

Thank you @FelixYBW! I updated and regenerated the docs through dev/gen-all-config-docs.sh

Verified with:

  • dev/gen-all-config-docs.sh
  • GLUTEN_UPDATE=0 ./build/mvn test -Pbackends-velox -pl backends-velox -am -Dtest=none -DfailIfNoTests=false -DwildcardSuites=org.apache.gluten.config.AllGlutenConfiguration,org.apache.gluten.config.AllVeloxConfiguration
  • ./dev/format-scala-code.sh check
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core DOCS VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VL] Refactor GlutenConfig to reflect the right status under isModifiable()

2 participants