Skip to content

Add method createSegmentOnlineOfflineStateModelFactory in BaseServerStarter#18313

Merged
Jackie-Jiang merged 2 commits into
apache:masterfrom
J-HowHuang:pluggable-state-model
Apr 24, 2026
Merged

Add method createSegmentOnlineOfflineStateModelFactory in BaseServerStarter#18313
Jackie-Jiang merged 2 commits into
apache:masterfrom
J-HowHuang:pluggable-state-model

Conversation

@J-HowHuang
Copy link
Copy Markdown
Collaborator

Description

Similar to #18298, making this change allows overriding with customized state model factory

Changes

  1. Add a new method createSegmentOnlineOfflineStateModelFactory in BaseServerStarter to provide SegmentOnlineOfflineStateModelFactory and register.
  2. Change the private variables in SegmentOnlineOfflineStateModelFactory to protected

@J-HowHuang J-HowHuang requested a review from Jackie-Jiang April 23, 2026 20:45
@J-HowHuang J-HowHuang added the plugins Related to the plugin system label Apr 23, 2026
* Subclasses can override to return a custom factory.
*/
protected SegmentOnlineOfflineStateModelFactory createSegmentOnlineOfflineStateModelFactory(
InstanceDataManager instanceDataManager) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also pass in _transitionThreadPoolManager. We can change the constructor of SegmentOnlineOfflineStateModelFactory to not take _instanceId and read it from instanceDataManager

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.61%. Comparing base (6b79b57) to head (7d9b803).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
.../pinot/server/starter/helix/BaseServerStarter.java 0.00% 2 Missing ⚠️
...r/helix/SegmentOnlineOfflineStateModelFactory.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18313      +/-   ##
============================================
+ Coverage     63.60%   63.61%   +0.01%     
  Complexity     1659     1659              
============================================
  Files          3246     3246              
  Lines        197510   197514       +4     
  Branches      30578    30578              
============================================
+ Hits         125620   125655      +35     
+ Misses        61845    61818      -27     
+ Partials      10045    10041       -4     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.58% <0.00%> (+<0.01%) ⬆️
java-21 63.59% <0.00%> (+0.01%) ⬆️
temurin 63.61% <0.00%> (+0.01%) ⬆️
unittests 63.61% <0.00%> (+0.01%) ⬆️
unittests1 55.59% <ø> (+0.02%) ⬆️
unittests2 35.05% <0.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@Jackie-Jiang Jackie-Jiang merged commit ab9ac39 into apache:master Apr 24, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugins Related to the plugin system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants