[jira] [Commented] (IGNITE-2560) Support injections in entry processors
[ https://issues.apache.org/jira/browse/IGNITE-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15432965#comment-15432965 ] Andrew Mashenkov commented on IGNITE-2560: -- Hi, Semen {quote} I can't find test for invokeAll(Map> map, Object... args)', could you please point me where it was added? {quote} See class _GridCacheAbstractFullApiSelfTest_. Method _testTransformResourceInjection_ calls _doTransformResourceInjection_ with cache and cache-with-async. Method _doTransformResourceInjection_ make checks with _invoke_, _invokeAll_, _invokeAll (Map ...)_. {quote} in GridLocalAtomicCache let's do not use wrapper at all, instead just call GridResourceProcessor.inject on entry processor {quote} Please, take a look on method _invokeAllAsync_ in GridLocalAtomicCache class. Method signature tells it throws *no* exceptions, but _resourceProcessor.inject(..)_ does. Whether exception is being processed correctly? > Support injections in entry processors > -- > > Key: IGNITE-2560 > URL: https://issues.apache.org/jira/browse/IGNITE-2560 > Project: Ignite > Issue Type: Improvement > Components: cache >Reporter: Valentin Kulichenko >Assignee: Andrew Mashenkov > Fix For: 1.8 > > > Currently resources are not injected in entry processor, which is not > consistent with other functionality, like closures, jobs, listeners, etc. > To avoid performance degradation we should introspect the class only once, > cache this information and do not try to inject if there are no annotations. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-2560) Support injections in entry processors
[ https://issues.apache.org/jira/browse/IGNITE-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15426757#comment-15426757 ] Andrew Mashenkov commented on IGNITE-2560: -- Hi, Semen PR has been merged from latest master. Code's been cleaned up. I didn't run any benchmarks. I saw benchmark tests implemented by Alexey Stelmak, but I have no idea how to run it. Any help would be appreciated. > Support injections in entry processors > -- > > Key: IGNITE-2560 > URL: https://issues.apache.org/jira/browse/IGNITE-2560 > Project: Ignite > Issue Type: Improvement > Components: cache >Reporter: Valentin Kulichenko >Assignee: Andrew Mashenkov > Fix For: 1.8 > > > Currently resources are not injected in entry processor, which is not > consistent with other functionality, like closures, jobs, listeners, etc. > To avoid performance degradation we should introspect the class only once, > cache this information and do not try to inject if there are no annotations. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-2560) Support injections in entry processors
[ https://issues.apache.org/jira/browse/IGNITE-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15411764#comment-15411764 ] Alexey Goncharuk commented on IGNITE-2560: -- The pull request is https://github.com/apache/ignite/pull/510 > Support injections in entry processors > -- > > Key: IGNITE-2560 > URL: https://issues.apache.org/jira/browse/IGNITE-2560 > Project: Ignite > Issue Type: Improvement > Components: cache >Reporter: Valentin Kulichenko >Assignee: Alexey Stelmak > Fix For: 1.7 > > > Currently resources are not injected in entry processor, which is not > consistent with other functionality, like closures, jobs, listeners, etc. > To avoid performance degradation we should introspect the class only once, > cache this information and do not try to inject if there are no annotations. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-2560) Support injections in entry processors
[ https://issues.apache.org/jira/browse/IGNITE-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15166318#comment-15166318 ] Alexey Stelmak commented on IGNITE-2560: - ??for me all new tests fail with error??... fixed. - ??can not find changes for local/atomic cache?? done. - ??I think it makes sense to add flag 'entryProcessorAnnotations' in GridResourceIoc.ClassDescriptor to avoid extra checks on each 'invoke' call (and remove method 'isAnnotationsPresent' you added)??... done, but implemented differently (see 'isAnnotationsPresent') - ??need to add tests for both methods 'invokeAll(Map map)' and 'invokeAll(Set keys, EntryProcessor entryProcessor)' and check in tests all supported annotations??... done (GridCacheAbstractFullApiSelfTest and GridTransformSpringInjectionSelfTest) - ??need test all transaction types and not only case when tx is rolled back, also for tx cache need check case without starting explicit transaction (just 'cache.invoke' outside of IgniteTransactions.start()/commit)??... done. - ??please change exception thrown by EntryProcessorResourceInjectorProxy: 'throw new RuntimeException(e)' -> 'throw new IgniteException("Failed to inject entry processor resources', e);'??... done. - ??inside GridCacheMapEntry.innerGet0 and innerUpdate entry processor class name is passed to EVT_CACHE_OBJECT_READ, when proxy is used then original entry processor class name is lost, need to fix this and add test??... done. > Support injections in entry processors > -- > > Key: IGNITE-2560 > URL: https://issues.apache.org/jira/browse/IGNITE-2560 > Project: Ignite > Issue Type: Improvement > Components: cache >Reporter: Valentin Kulichenko >Assignee: Alexey Stelmak > Fix For: 1.6 > > > Currently resources are not injected in entry processor, which is not > consistent with other functionality, like closures, jobs, listeners, etc. > To avoid performance degradation we should introspect the class only once, > cache this information and do not try to inject if there are no annotations. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-2560) Support injections in entry processors
[ https://issues.apache.org/jira/browse/IGNITE-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15160344#comment-15160344 ] Semen Boikov commented on IGNITE-2560: -- Reviewed, there are some problems: - for me all new tests fail with error: {noformat} Caused by: java.lang.IllegalArgumentException: Unwrapping to class is not supported: class org.apache.ignite.internal.processors.cache.GridCacheContext at org.apache.ignite.internal.processors.cache.CacheLazyEntry.unwrap(CacheLazyEntry.java:146) at org.apache.ignite.internal.processors.cache.CacheInvokeEntry.unwrap(CacheInvokeEntry.java:131) at org.apache.ignite.internal.processors.cache.EntryProcessorResourceInjectorProxy.process(EntryProcessorResourceInjectorProxy.java:68) at org.apache.ignite.internal.processors.cache.GridCacheMapEntry.innerUpdate(GridCacheMapEntry.java:2186) {noformat} - can not find changes for local/atomic cache - I think it makes sense to add flag 'entryProcessorAnnotations' in GridResourceIoc.ClassDescriptor to avoid extra checks on each 'invoke' call (and remove method 'isAnnotationsPresent' you added) - need to add tests for both methods 'invokeAll(Map map)' and 'invokeAll(Set keys, EntryProcessor entryProcessor)' and check in tests all supported annotations - need test all transaction types and not only case when tx is rolled back, also for tx cache need check case without starting explicit transaction (just 'cache.invoke' outside of IgniteTransactions.start()/commit) - please change exception thrown by EntryProcessorResourceInjectorProxy: 'throw new RuntimeException(e)' -> 'throw new IgniteException("Failed to inject entry processor resources', e);' > Support injections in entry processors > -- > > Key: IGNITE-2560 > URL: https://issues.apache.org/jira/browse/IGNITE-2560 > Project: Ignite > Issue Type: Improvement > Components: cache >Reporter: Valentin Kulichenko >Assignee: Alexey Stelmak > Fix For: 1.6 > > > Currently resources are not injected in entry processor, which is not > consistent with other functionality, like closures, jobs, listeners, etc. > To avoid performance degradation we should introspect the class only once, > cache this information and do not try to inject if there are no annotations. -- This message was sent by Atlassian JIRA (v6.3.4#6332)