ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Gura (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-2646) IgniteCompute.withAsync can execute tasks synchronously
Date Fri, 12 Feb 2016 16:47:18 GMT
Andrey Gura created IGNITE-2646:

             Summary: IgniteCompute.withAsync can execute tasks synchronously
                 Key: IGNITE-2646
                 URL: https://issues.apache.org/jira/browse/IGNITE-2646
             Project: Ignite
          Issue Type: Bug
          Components: compute
    Affects Versions: 1.5.0.final
            Reporter: Andrey Gura
            Assignee: Andrey Gura

{{GridTaskWorker}} can invoke {{reduce}} method in caller thread.

If task isn't annotated by {{@ComputeTaskMapAsync}} then job mapping will be run in caller
thread. Since job mapping will be finished {{processDelayedResponses}} method will be invoked
and if delayed responses queue isn't empty then caller thread can invoke {{reduce}} method
eventually and perform reducing synchronously.

It can be usefull in case of synchronous execution but, it is strange behavior for asynchronous
case because user expects that method will return after creation of task.

Similar behavior is possible for all places where code invokes {{GridTaskProcessor.execute()}}
method ({{IgniteCompute.broadcast()}}, {{IgniteCache.size()}}, REST handlers, etc.)

Rerated discussion on dev-list: [IgniteCompute.withAsync can execute tasks synchronously|http://apache-ignite-developers.2346864.n4.nabble.com/IgniteCompute-withAsync-can-execute-tasks-synchronously-td7262.html]

This message was sent by Atlassian JIRA

View raw message