[ 
https://issues.apache.org/jira/browse/GROOVY-12280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18105758#comment-18105758
 ] 

ASF GitHub Bot commented on GROOVY-12280:
-----------------------------------------

codecov-commenter commented on PR #2818:
URL: https://github.com/apache/groovy/pull/2818#issuecomment-5336657469

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2818?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :x: Patch coverage is `78.94737%` with `4 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 70.1768%. Comparing base 
([`1c2f0f2`](https://app.codecov.io/gh/apache/groovy/commit/1c2f0f27e9e39bfb277f5f22986f8fd7a5345b58?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`6c11ed7`](https://app.codecov.io/gh/apache/groovy/commit/6c11ed7226b751193340dd3d7eeec37300d1abf0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2818?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...va/groovy/concurrent/AwaitableAdapterRegistry.java](https://app.codecov.io/gh/apache/groovy/pull/2818?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Fconcurrent%2FAwaitableAdapterRegistry.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvY29uY3VycmVudC9Bd2FpdGFibGVBZGFwdGVyUmVnaXN0cnkuamF2YQ==)
 | 78.9474% | [3 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2818?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2818/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2818?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2818        +/-   ##
   ==================================================
   - Coverage     70.1794%   70.1768%   -0.0026%     
   - Complexity      35853      35860         +7     
   ==================================================
     Files            1563       1563                
     Lines          132546     132558        +12     
     Branches        24385      24387         +2     
   ==================================================
   + Hits            93020      93025         +5     
   - Misses          31113      31120         +7     
     Partials         8413       8413                
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2818?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...va/groovy/concurrent/AwaitableAdapterRegistry.java](https://app.codecov.io/gh/apache/groovy/pull/2818?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Fconcurrent%2FAwaitableAdapterRegistry.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvY29uY3VycmVudC9Bd2FpdGFibGVBZGFwdGVyUmVnaXN0cnkuamF2YQ==)
 | `72.0000% <78.9474%> (-1.0159%)` | :arrow_down: |
   
   ... and [7 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2818/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> AwaitableAdapterRegistry.awaitableCache pins the Groovy class loader via 
> ClassValue associations on platform-class keys
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12280
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12280
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Paul King
>            Priority: Major
>
> {{AwaitableAdapterRegistry}} caches adapter lookups in a raw 
> {{java.lang.ClassValue}} keyed by the awaited object's class. The common keys 
> are platform classes — {{CompletableFuture}}, {{CompletionStage}}, 
> {{Flow.Publisher}} implementations — while the cached value (the adapter 
> instance) is loaded by Groovy's class loader. A {{ClassValue}} association 
> lives as long as its key class 
> ([JDK-8136353|https://bugs.openjdk.org/browse/JDK-8136353], working as 
> intended), so an association on an effectively immortal platform class holds 
> the adapter, and through it the entire Groovy class loader, for the lifetime 
> of the JVM. In the per-webapp deployment topology this re-creates exactly the 
> pinning GROOVY-12142 removed elsewhere: metaspace growth on every 
> redeployment once any {{await}} has executed.
> Note this site is not covered by the {{groovy.use.classvalue=false}} escape 
> hatch restored in GROOVY-12142 — it does not go through 
> {{GroovyClassValueFactory}} (which is package-private in 
> {{org.codehaus.groovy.reflection}} and not reachable from 
> {{groovy.concurrent}}).
> Unlike the general {{ClassInfo}} problem (see the companion investigation 
> ticket), the preconditions for the {{SoftReference}} strategy are already 
> satisfied here by construction: recomputation is a cheap, pure scan over the 
> adapter list, and the registry already rebuilds the cache on mutation. 
> Proposed fix: wrap values in {{SoftReference}} with the 
> check-remove-recompute discipline (on a cleared reference, {{remove(...)}} 
> the association and recompute), optionally also widening 
> {{GroovyClassValueFactory}} so this site honors the escape hatch for 
> consistency.
> Follow-up from review discussion on [PR 
> #2798|https://github.com/apache/groovy/pull/2798] (GROOVY-12142).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to