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

Stanislav Lukyanov commented on IGNITE-9005:
--------------------------------------------

[~kcheng.mvp], [~dpavlov] The issue isn't with the CacheOffheapEvictionManager, 
it's with the initialization order.
It is required that injection of the context (such as @CacheNameResource) is 
done *before* processing LifecycleAware interfaces, so that if a bean (e.g. 
eviction policy) both has an injection annotation and is LifecycleAware then 
its start() method is executed after all injections are completed.
This invariant was broken for eviction policies by the fix IGNITE-8776.
The fix now would be to make sure that LifecycleAware is always processed after 
the injections. I have a patch, will create a PR shortly.

> Eviction policy MBeans change failed LifecycleAwareTest on cache name 
> injectoin
> -------------------------------------------------------------------------------
>
>                 Key: IGNITE-9005
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9005
>             Project: Ignite
>          Issue Type: Test
>            Reporter: Dmitriy Pavlov
>            Assignee: kcheng.mvp
>            Priority: Major
>              Labels: MakeTeamcityGreenAgain
>             Fix For: 2.7
>
>
> http://apache-ignite-developers.2346864.n4.nabble.com/MTCGA-new-failures-in-builds-1485687-needs-to-be-handled-td32531.html
> New test failure detected 
> https://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8&testNameId=7246907407546697403&branch=%3Cdefault%3E&tab=testDetails
> after merging 
> IGNITE-8776 Eviction policy MBeans are never registered if 
> evictionPolicyFactory is used 
> Revert of commit makes test passing.
> Locally test also failed. Failed with message
> {noformat}
> Unexpected cache name for 
> org.apache.ignite.internal.processors.cache.GridCacheLifecycleAwareSelfTest$TestEvictionPolicy@322714f4
>  expected:<cache> but was:<null>
> {noformat}
> Message of failure seems to be related to TestEvictionPolicy instance from 
> test class. 
> Seems that returing call to cctx.kernalContext (). resource (). 
> injectCacheName (rsrc, cfg.getName ()); should fix issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to