-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed CompoundPinotMetricsFactory to use PluginManager instead of Class.forName #14402
base: master
Are you sure you want to change the base?
Changed CompoundPinotMetricsFactory to use PluginManager instead of Class.forName #14402
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14402 +/- ##
============================================
+ Coverage 61.75% 63.77% +2.02%
- Complexity 207 1557 +1350
============================================
Files 2436 2660 +224
Lines 133233 145976 +12743
Branches 20636 22356 +1720
============================================
+ Hits 82274 93093 +10819
- Misses 44911 46000 +1089
- Partials 6048 6883 +835
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Essentially everything potentially loaded from plugin-ins should be done via PluginManager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example of the kind of migrations we should apply in order to be able to use the improvements proposed in #13930, which would let us run Pinot without shading.
These changes are definitely necessary but not sufficient to ensure the above - we can still run into dependency conflict issues between plugin dependencies and Pinot dependencies if we don't use shading (alternative would be to introduce full classloader isolation where plugin dependencies aren't added to the main application classpath).
...rics/src/main/java/org/apache/pinot/plugin/metrics/compound/CompoundPinotMetricsFactory.java
Outdated
Show resolved
Hide resolved
…va/org/apache/pinot/plugin/metrics/compound/CompoundPinotMetricsFactory.java Co-authored-by: Yash Mayya <[email protected]>
Yeah, sure. This is necessary but not sufficient. We still need to change the packaging and use the new classpath realm system. But we cannot turn it on until we actually apply this change everywhere we can load plugins. This include plugins loaded with ServiceLoader (which I encouraged in the past), which will need to be rewritten to use PluginManager instead of ServiceLoader |
Anyway, remember we are NOT using shading right now. We are shading (paying the cost in terms of build time and artifact size) but changing all dependencies with the same prefix, so that shading is not preventing any issue between shaded plugins and Pinot |
This is a small PR created to be an example of the kind of migrations we should apply in order to be able to use the improvements proposed in #13930, which would let us run Pinot without shading.