[
https://issues.apache.org/jira/browse/IGNITE-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15133115#comment-15133115
]
Valentin Kulichenko commented on IGNITE-1144:
---------------------------------------------
Hi Oddo.
I reviewed your changes. Looks like you're making progress, but I have several
comments:
* Code after your changes can't be compiled against Java7 (looks like you're
working with Java8). Please make sure it compiles with both 7 and 8.
* Can you explain {{CU.outTx}} calls in {{GridCacheQueueProxy}} and
{{GridCacheSetProxy}}? You execute closure twice for transactional caches which
is obviously wrong. Actually, proxy should only block the gateway and delegate,
all other code should be in corresponding implementation classes. Anyway, most
likely taht these pieces of code should be removed.
* Since you added async methods annotated with {{@IgniteAsyncSupported}}, you
should also implement {{IgniteAsyncSupport}} interface. Currently there is no
way to execute these operations asynchronously.
* You should improve test coverage. Couple of tests you added check almost
nothing, they don't even have a single assertion. Moreover, they fail. Please
don't forget to run TC before submitting a patch.
I would also rephrase the error message and mention the data structure name
there. Smth like this:
{code}
throw new IgniteException("Failed to execute affinityCall() for non-collocated
set: " + name +
". This operation is supported only for collocated sets.");
{code}
Thanks!
> Need to have a capability to run a closure collocated with a queue/set
> ----------------------------------------------------------------------
>
> Key: IGNITE-1144
> URL: https://issues.apache.org/jira/browse/IGNITE-1144
> Project: Ignite
> Issue Type: Improvement
> Components: cache
> Affects Versions: 1.1.4
> Reporter: Valentin Kulichenko
> Assignee: Oddo
> Priority: Critical
>
> Currently there is no way to do this since all collocated queues and sets are
> stored in special system cache. This makes {{affinityRun()}} and
> {{affinityCall()}} methods useless because it requires to explicitly provide
> cache name which user doesn't know in this case.
> I suggest to add {{affinityRun()}} and {{affinityCall()}} methods on
> {{IgniteQueue}} and {{IgniteSet}}. They will:
> * take only closure as a parameter
> * throw exception for non-collocated mode
> * properly delegate to sibling methods in {{Ignite}} with proper cache name
> Alternatively we can add these methods on {{Ignite}} interface, which is more
> consistent with the current API. But I'm not sure how to call them.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)