[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-11 Thread kcheng.mvp (JIRA)


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

kcheng.mvp commented on IGNITE-8776:


[~dpavlov] Can you please take a look about this PR. it has been passed 
[~slukyanov] 's review.

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
> Fix For: 2.7
>
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-10 Thread Stanislav Lukyanov (JIRA)


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

Stanislav Lukyanov commented on IGNITE-8776:


[~kcheng.mvp], thanks for the changes, I have no more comments.

[~dpavlov], could you please also take a look and merge the fix if it's OK?

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
> Fix For: 2.7
>
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-08 Thread kcheng.mvp (JIRA)


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

kcheng.mvp commented on IGNITE-8776:


[~slukyanov] I did the necessary changes, please view it again. Thanks.

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
> Fix For: 2.6
>
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-06 Thread Stanislav Lukyanov (JIRA)


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

Stanislav Lukyanov commented on IGNITE-8776:


[~kcheng.mvp] I've left some comments on the github - let's discuss the code 
there.

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
> Fix For: 2.6
>
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-06 Thread kcheng.mvp (JIRA)


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

kcheng.mvp commented on IGNITE-8776:


[~slukyanov]

Everything is greep 
https://ci.ignite.apache.org/viewLog.html?buildId=1462771&tab=buildResultsDiv&buildTypeId=IgniteTests24Java8_RunBasicTests

Can you help me do a code review?

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-06 Thread Stanislav Lukyanov (JIRA)


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

Stanislav Lukyanov commented on IGNITE-8776:


[~kcheng.mvp] Having some failed tests is (unfortunately) OK - some tests are 
flacky, some suites could be broken. If other branches (especially master) also 
have the same failures, it's OK.

It's best to trigger Run::All, not just Run::BasicTests.
I've started one: 
https://ci.ignite.apache.org/viewQueued.html?itemId=1462073&tab=queuedBuildOverviewTab
Let's see how it goes.

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-05 Thread kcheng.mvp (JIRA)


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

kcheng.mvp commented on IGNITE-8776:


I have triggered the tests many times on TeamCity. every time I get the same 
result.

Platform .NET (Core Linux)  pull/4300/head  #1109Exit code 1 (new) 

https://ci.ignite.apache.org/viewLog.html?buildId=1460429&tab=buildResultsDiv&buildTypeId=IgniteTests24Java8_RunBasicTests.

I checked the history of 'Platform .NET (Core Linux) ' and found there are many 
other build also runs into the same result.



> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-05 Thread kcheng.mvp (JIRA)


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

kcheng.mvp commented on IGNITE-8776:


[~slukyanov]

I have raised PR, can you help me do the code review?
https://github.com/apache/ignite/pull/4300

Thanks,
kcmvp

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-04 Thread kcheng.mvp (JIRA)


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

kcheng.mvp commented on IGNITE-8776:


[~slukyanov]

Thank you very much!
The fix pretty much done, but I have an unclear and I posted in the forum. Can 
you have a check ?

http://apache-ignite-developers.2346864.n4.nabble.com/Why-GridCacheEvictionManager-always-use-cfg-getEvictionPolicy-cfg-getEvictionPolicyFactory-even-ther-td32230.html

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-04 Thread Stanislav Lukyanov (JIRA)


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

Stanislav Lukyanov commented on IGNITE-8776:


[~kcheng.mvp] thanks for looking into this!

Yes, it seems that moving all responsibility for the eviction policy to the 
`GridCacheEvictionManager` would be the best.
Roughly speaking, having a `prepare()` method in GridCacheEvictionManager same 
as the one in the `GridCacheProcessor` seems alright.

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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


[jira] [Commented] (IGNITE-8776) Eviction policy MBeans are never registered if evictionPolicyFactory is used

2018-07-03 Thread kcheng.mvp (JIRA)


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

kcheng.mvp commented on IGNITE-8776:


Hi [~slukyanov],Here is my investigation:

-- 
org.apache.ignite.internal.processors.cache.GridCacheProcessor#prepareCacheStart
- *call 
org.apache.ignite.internal.processors.cache.GridCacheProcessor#createCache* at 
line #1944
- *startCache(cache, desc.schema() != null ? desc.schema() : new 
QuerySchema());* at line #1963

For case using *FifoEvictionPolicyFactory* and *LruEvictionPolicyFactory* the 
backend eviction policy is generated by factory's *create()* method when 
starting a cache. That's to say even through the eviction factory full fill the 
*MBean interface or IgniteMBeanAware interface*, it can still not be registered 
at 
*org.apache.ignite.internal.processors.cache.GridCacheProcessor#registerMbean*, 
as the instances have not been generated.

so I think the best place to register the mbeans is in 
*org.apache.ignite.internal.processors.cache.GridCacheEvictionManager*.

please advise me if I am wrong.
[~slukyanov]

> Eviction policy MBeans are never registered if evictionPolicyFactory is used
> 
>
> Key: IGNITE-8776
> URL: https://issues.apache.org/jira/browse/IGNITE-8776
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.5
>Reporter: Stanislav Lukyanov
>Assignee: kcheng.mvp
>Priority: Minor
>  Labels: newbie
>
> Eviction policy MBeans, such as LruEvictionPolicyMBean, are never registered 
> if evictionPolicyFactory is set instead of evictionPolicy (the latter is 
> deprecated).
> This happens because GridCacheProcessor::registerMbean attempts to find 
> either an *MBean interface or IgniteMBeanAware interface on the passed 
> object. It works for LruEvictionPolicy but not for LruEvictionPolicyFactory 
> (which doesn't implement these interfaces).
> The code needs to be adjusted to handle factories correctly.
> New tests are needed to make sure that all standard beans are registered 
> (IgniteKernalMbeansTest does that for kernal mbeans - need the same for cache 
> beans).



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