Skip to content

Leave tenant isolation unset in the generated controller config - #19393

Open
Jackie-Jiang wants to merge 1 commit into
apache:masterfrom
Jackie-Jiang:optional-tenant-isolation-in-controller-conf
Open

Leave tenant isolation unset in the generated controller config#19393
Jackie-Jiang wants to merge 1 commit into
apache:masterfrom
Jackie-Jiang:optional-tenant-isolation-in-controller-conf

Conversation

@Jackie-Jiang

Copy link
Copy Markdown
Contributor

Summary

PinotConfigUtils#generateControllerConf always wrote cluster.tenant.isolation.enable into the config it generates from individual options. The generated config therefore had no way to express "the caller did not choose a value", and any default a ControllerStarter implementation supplies from applyCustomConfigs was dead on that path — the key was already present, so a set-if-missing default could never win.

The value is now a nullable Boolean, and the key is written only when a caller passes one.

Changes

  • PinotConfigUtils#generateControllerConf takes @Nullable Boolean tenantIsolation and only puts the key when it is non-null.
  • StartControllerCommand#_tenantIsolation defaults to null instead of true. Worth noting this field has no @CommandLine.Option — it can only be set programmatically — so previously there was no way to run the command without pinning the key.
  • StartServiceManagerCommand#getDefaultConfig hardcoded true for CONTROLLER, pinning the key for every controller the service manager bootstraps without an explicit config. It now leaves it unset.
  • isTenantIsolation() is renamed to getTenantIsolation() and returns a nullable Boolean, so callers see the tri-state instead of auto-unboxing a possibly-null value.

Unchanged: QuickstartRunner still calls setTenantIsolation(...) explicitly, so quickstarts keep pinning whatever they ask for. PerfBenchmarkDriver and ControllerStarter#startDefault still pin their values directly. setTenantIsolation(boolean) keeps its signature, so existing callers compile as-is.

Behavior

No change for Pinot. ControllerConf#tenantIsolationEnabled already falls back to true when the key is absent, which is exactly what the removed literals wrote. The effect is that this fallback becomes the single place the default lives, instead of being shadowed by three call sites that wrote the same value into generated configs.

The motivation is downstream: a ControllerStarter subclass that wants a different tenant isolation default can now express it through applyCustomConfigs, on every launch path rather than only when a config file is supplied.

API note

isTenantIsolation()getTenantIsolation() is a public signature change on StartControllerCommand. It has no callers in the repo. Happy to keep the old name and just widen the return type if reviewers prefer the smaller surface, though isX() returning a boxed nullable invites an auto-unboxing NPE at call sites.

PinotConfigUtils#generateControllerConf always wrote cluster.tenant.isolation.enable into the
config it generates from individual options, so the generated config could not express "the
caller did not choose". Any value a ControllerStarter implementation supplies from
applyCustomConfigs was therefore dead on that path -- the key was already present, so a
set-if-missing default could never win.

The value is now a nullable Boolean, and the key is written only when a caller passes one:

- StartControllerCommand#_tenantIsolation defaults to null instead of true. The field has no
  @CommandLine.Option, so it can only be set programmatically, and it was previously impossible
  to launch the command without pinning the key.
- StartServiceManagerCommand#getDefaultConfig hardcoded true for CONTROLLER, which pinned the
  key for every controller the service manager bootstraps without an explicit config. It now
  leaves it unset.
- QuickstartRunner still calls setTenantIsolation explicitly, so quickstarts keep pinning the
  value they ask for. PerfBenchmarkDriver and ControllerStarter#startDefault are unchanged.

Behavior is unchanged for OSS: ControllerConf#tenantIsolationEnabled already falls back to true
when the key is absent, which is exactly what the removed literals wrote. It becomes the single
place the default lives.

isTenantIsolation() is renamed to getTenantIsolation() and returns a nullable Boolean, so that
callers see the tri-state rather than auto-unboxing a possibly-null value.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Jackie-Jiang Jackie-Jiang added tools Related to Pinot CLI tools and utilities configuration Config changes (addition/deletion/change in behavior) refactor Code restructuring without changing behavior labels Aug 29, 2026
@Jackie-Jiang
Jackie-Jiang requested a review from xiangfu0 August 29, 2026 00:14
@codecov-commenter

codecov-commenter commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.60%. Comparing base (bd69e76) to head (cbe39ce).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19393      +/-   ##
============================================
+ Coverage     57.68%   67.60%   +9.91%     
- Complexity        7     1430    +1423     
============================================
  Files          2686     3486     +800     
  Lines        163955   224134   +60179     
  Branches      26623    35376    +8753     
============================================
+ Hits          94579   151519   +56940     
+ Misses        61379    60582     -797     
- Partials       7997    12033    +4036     
Flag Coverage Δ
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-25 67.60% <ø> (+9.91%) ⬆️
lane-a 100.00% <ø> (ø)
lane-b 0.00% <ø> (ø)
temurin 67.60% <ø> (+9.91%) ⬆️
unittests 67.59% <ø> (+9.91%) ⬆️
unittests1 57.68% <ø> (-0.01%) ⬇️
unittests2 39.34% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

configuration Config changes (addition/deletion/change in behavior) refactor Code restructuring without changing behavior tools Related to Pinot CLI tools and utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants