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

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

testlens-app[bot] commented on PR #2736:
URL: https://github.com/apache/groovy/pull/2736#issuecomment-5134123716

   ## 🚨 TestLens detected 1 failed test 🚨
   
   Here is what you can do:
   
   1) Inspect the test failures carefully.
   2) If you are convinced that some of the tests are flaky, you can mute them 
below.
   3) Finally, trigger a rerun by checking the rerun checkbox.
   
   ### Test Summary
   
   #### [Build and test / lts \(17, windows-latest, 
1\)](https://github.com/apache/groovy/actions/runs/30562181207/job/90937707787?pr=2736)
 > :test
   
   | Test | Runs | Flakiness |
   |---|---|--:|
   | ClassTagExtensionModuleTest | ❌ | 20% 🔴 |
   
   🏷️ Commit: 637bdaf68a2816930d4d45211584bc77bfe7a9b7
   ▶️ Tests:  107583 executed
   🟡 Checks: 26/29 completed
   
   ### Test Failures
   
   <details>
   
   <summary><strong>ClassTagExtensionModuleTest</strong> (:test in <a 
href="https://github.com/apache/groovy/actions/runs/30562181207/job/90937707787?pr=2736";>Build
 and test / lts (17, windows-latest, 1)</a>)</summary>
   
   ```
   org.junit.platform.commons.JUnitException: Failed to close extension context
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   Caused by: 
org.junit.jupiter.api.io.TempDirDeletionStrategy$DeletionException: Failed to 
delete temp directory 
C:\Users\RUNNER~1\AppData\Local\Temp\junit-5101024648579581687. The following 
paths could not be deleted (see suppressed exceptions for details): <root>, 
classtag-module-test.jar
        Suppressed: java.nio.file.DirectoryNotEmptyException: 
C:\Users\RUNNER~1\AppData\Local\Temp\junit-5101024648579581687
                at 
java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:272)
                at 
java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
                at java.base/java.nio.file.Files.delete(Files.java:1152)
                at java.base/java.nio.file.Files.walkFileTree(Files.java:2828)
                at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
                at 
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
                at 
java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
                at 
java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                at 
java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                at 
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
                at 
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
                at 
java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                at 
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                at 
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                at 
java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        Suppressed: java.nio.file.FileSystemException: 
C:\Users\RUNNER~1\AppData\Local\Temp\junit-5101024648579581687\classtag-module-test.jar:
 The process cannot access the file because it is being used by another process
                at 
java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
                at 
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
                at 
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
                at 
java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
                at 
java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
                at java.base/java.nio.file.Files.delete(Files.java:1152)
                at java.base/java.nio.file.Files.walkFileTree(Files.java:2811)
                at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
                at 
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
                at 
java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
                at 
java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                at 
java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                at 
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
                at 
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
                at 
java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                at 
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                at 
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                at 
java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
                Suppressed: java.nio.file.FileSystemException: 
C:\Users\RUNNER~1\AppData\Local\Temp\junit-5101024648579581687\classtag-module-test.jar:
 The process cannot access the file because it is being used by another process
                        ... 20 more
   ```
   
   </details>
   
   ### Muted Tests
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 ClassTagExtensionModuleTest <!

> Scope indy SwitchPoint invalidation
> -----------------------------------
>
>                 Key: GROOVY-12191
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12191
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Priority: Major
>             Fix For: 6.0.0-beta-1
>
>
> h3. Problem
> With invokedynamic enabled (default since Groovy 4), linked MOP call sites 
> were guarded by a *single process-wide* {{SwitchPoint}} 
> ({{{}IndyInterface.switchPoint{}}}).
> Any MetaClass registry change or category enter/leave invalidated that switch 
> point, so *every* linked site fell back and re-linked — including sites whose 
> receiver type was unrelated.
> That global invalidation is expensive when MetaClass churn is common (e.g. 
> ExpandoMetaClass / mixins on startup or per-request paths, Grails-like 
> patterns). Unrelated hot monomorphic sites pay re-link and JIT deopt cost 
> they should not.
> h3. Goal
> Keep linked call sites optimized unless the *relevant* MetaClass state for 
> that site actually changed.
> h3. Approach
> One SwitchPoint domain {*}per class{*}, stored on {{{}ClassInfo{}}}:
>  * MetaClass change for type {{T}} retires {{{}T{}}}'s SwitchPoint *and* 
> those of loaded subtypes / implementors (hierarchy fan-out).
>  * Unrelated types keep their SwitchPoints; their call sites stay optimized.
>  * Category enter/leave (and {{{}VMPlugin.invalidateCallSites(){}}}) 
> bulk-retire *all* loaded class SwitchPoints so sites re-link under the new 
> category state. There is *no* second category SwitchPoint on the hot path.
>  * Linked handles always install a *single* class-domain guard via 
> {{IndyInvalidation.guardWithMopSwitchPoints(...)}} — same monomorphic guard 
> shape as before, without global deopt on unrelated MetaClass churn.
> Final classes short-circuit hierarchy fan-out (no full {{ClassInfo}} scan). 
> Non-final types batch retirements with {{{}SwitchPoint.invalidateAll{}}}.
> h3. Invalidation map
> ||Event||What is retired||
> |MetaClass change for type {{T}} (registry / 
> {{{}ClassInfo.incVersion{}}})|{{T}} + loaded subtypes / implementors|
> |Category enter/leave, {{invalidateCallSites()}}|All loaded class 
> SwitchPoints (bulk)|
> |Unattributed MetaClass registry event|All loaded class SwitchPoints (bulk)|
> |First MetaClass *install* on a class|Version bump only (no linked sites 
> yet); replacement / clear retires that class's SwitchPoint|
>  



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

Reply via email to