Mikhail Petrov created IGNITE-18545:
---------------------------------------

             Summary: Compute "withXXX" modifiers in some cases are not applied 
to the user compute method call.
                 Key: IGNITE-18545
                 URL: https://issues.apache.org/jira/browse/IGNITE-18545
             Project: Ignite
          Issue Type: Bug
            Reporter: Mikhail Petrov


When the "withXXX" IgniteCompute methods are called, we set the corresponding 
thread-local parameters that are applied to the first task executed (see 
IgniteComputeImpl#withName).
When we run the task, we clear all the thread-local settings that were set 
earlier.

Consider the IgniteCompute#affinityCall method.
During its execution, in some cases we run a system task to get the affinity 
distribution from other nodes (see GridAffinityProcessor#affinityKey and 
GridAffinityProcessor#affinityInfoFromNode). As a result, the mentioned above 
modifiers are applied to the system task that requests the affinity 
distribution but not the user task.

It seems that the current approach to setting task parameters via thread-local 
variables is  error-prone and should be refactored.





--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to