Alexander Menshikov created IGNITE-5994:

             Summary: IgniteInternalCache.invokeAsync().get() can return null
                 Key: IGNITE-5994
             Project: Ignite
          Issue Type: Bug
            Reporter: Alexander Menshikov

The IgniteInternalCache.invoke() always return an EntryProcessorResult, but the 
IgniteInternalCache.invokeAsync().get() can return the null in case when an 
EntryProcessor has returned the null.

Code from reproducer:

final EntryProcessor<Object, Object, Object> ep = new EntryProcessor<Object, 
Object, Object>() {
            public Object process(MutableEntry<Object, Object> entry,
                Object... objects) throws EntryProcessorException {
                return null;

        EntryProcessorResult<Object> result = utilCache.invoke("test", ep);


        result = utilCache.invokeAsync("test", ep).get();

        // Assert here!!!
It can be optimization. Nevertheless results of invoke() must be equals with 
results of invokeAsync().get(). So there are two options:

1) To do so would be the invokeAsync(key, ep).get() returned the null too for 
the optimization.
2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult 
for a logical consistency.

NOTE: Don't confuse with IgniteCache.invoke.

This message was sent by Atlassian JIRA

Reply via email to