Skip to content
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

[hotfix]groovy class cache leak #9716

Merged
merged 2 commits into from
Nov 3, 2022

Conversation

walterddr
Copy link
Contributor

@walterddr walterddr commented Nov 3, 2022

classloader cache is not cleared.

before:
Screenshot 2022-11-03 at 10 44 24

after:
Screenshot 2022-11-03 at 16 23 48

@walterddr walterddr marked this pull request as ready for review November 3, 2022 15:29
@cyrilou242
Copy link
Contributor

👍

Comment on lines 46 to 47
String templateRendered = GROOVY_TEMPLATE_ENGINE.createTemplate(template).make(contextMap).toString();
GROOVY_SHELL.getClassLoader().clearCache();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this means the cache will not kick in if we try to re-register the same template. but i don't think this will be created on a per-row basis

Co-authored-by: Xiaotian (Jackie) Jiang <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2022

Codecov Report

Merging #9716 (6ded47f) into master (91fa86b) will increase coverage by 34.88%.
The diff coverage is 85.79%.

@@              Coverage Diff              @@
##             master    #9716       +/-   ##
=============================================
+ Coverage     28.13%   63.01%   +34.88%     
- Complexity       53     4758     +4705     
=============================================
  Files          1936     1938        +2     
  Lines        103927   104133      +206     
  Branches      15770    15780       +10     
=============================================
+ Hits          29235    65619    +36384     
+ Misses        71832    33643    -38189     
- Partials       2860     4871     +2011     
Flag Coverage Δ
integration1 25.32% <0.00%> (-0.09%) ⬇️
integration2 24.68% <0.00%> (-0.01%) ⬇️
unittests1 67.52% <85.79%> (?)

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

Impacted Files Coverage Δ
...t/query/runtime/plan/ServerRequestPlanVisitor.java 78.57% <78.57%> (ø)
...va/org/apache/pinot/query/runtime/QueryRunner.java 81.55% <90.00%> (+81.55%) ⬆️
...e/pinot/query/runtime/plan/PlanRequestContext.java 92.85% <92.85%> (ø)
...ot/query/runtime/executor/WorkerQueryExecutor.java 100.00% <100.00%> (+100.00%) ⬆️
.../pinot/query/runtime/plan/PhysicalPlanVisitor.java 96.87% <100.00%> (ø)
.../runtime/plan/server/ServerPlanRequestContext.java 100.00% <100.00%> (ø)
...rg/apache/pinot/spi/utils/GroovyTemplateUtils.java 88.46% <100.00%> (+88.46%) ⬆️
...ntroller/helix/core/minion/TaskMetricsEmitter.java 76.74% <0.00%> (-9.31%) ⬇️
...e/pinot/controller/helix/SegmentStatusChecker.java 72.15% <0.00%> (-4.55%) ⬇️
...in/stream/kafka20/KafkaStreamMetadataProvider.java 25.80% <0.00%> (-3.29%) ⬇️
... and 1101 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@walterddr walterddr merged commit 9698b3e into apache:master Nov 3, 2022
@walterddr walterddr deleted the hotfix_groovy_leak branch December 6, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants