[ 
https://issues.apache.org/jira/browse/IGNITE-28642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mikhail Petrov updated IGNITE-28642:
------------------------------------
    Description: 
IEP-143 Unified Operation Context Propagation implementation is highly 
susceptible to situations when closure/lambda is created in one thread but 
executed in another. 
In such cases, the Operation Context of the thread that created the closure may 
not be automatically restored for the duration of the closure execution in the 
executing thread.

The developer can unintentionally create such code (e.g. custom worker). 
To mitigate the described problem it is proposed to more thoroughly control 
thread creation in the project: restrict usage of java.lang.Thread and replace 
it with org.apache.ignite.thread.IgniteThread.

It will:
1. make project code more consistent
2. bind every thread to a specific Ignite instance
3. In the future, this will allow inlining code related to the operation 
context, for example:
* Automatically capture the operation context when starting a thread
* Assertions related to Operation Context



  was:
IEP-143 Unified Operation Context Propagation implementation is highly 
susceptible to situations when closure/lambda is created in one thread but 
executed in another. 
In such cases, the Operation Context of the thread that created the closure may 
not be automatically restored for the duration of the closure execution in the 
executing thread.

The developer can unintentionally create such code (e.g. custom worker). 
To mitigate the described problem it is proposed to more thoroughly control 
thread creation in the project: restrict usage of java.lang.Thread and replace 
it with org.apache.ignite.thread.IgniteThread.

It will:
1. make project code more consistent
2. bind every thread to a specific Ignite instance
3. allow in the future to embed Operation Context related code such as 
* Automatically capture the operation context when starting a thread
* Assertions related to Operation Context




> Replace java.lang.Thread with org.apache.ignite.thread.IgniteThread instances
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-28642
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28642
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Mikhail Petrov
>            Assignee: Mikhail Petrov
>            Priority: Major
>              Labels: IEP-143, ise
>             Fix For: 2.19
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> IEP-143 Unified Operation Context Propagation implementation is highly 
> susceptible to situations when closure/lambda is created in one thread but 
> executed in another. 
> In such cases, the Operation Context of the thread that created the closure 
> may not be automatically restored for the duration of the closure execution 
> in the executing thread.
> The developer can unintentionally create such code (e.g. custom worker). 
> To mitigate the described problem it is proposed to more thoroughly control 
> thread creation in the project: restrict usage of java.lang.Thread and 
> replace it with org.apache.ignite.thread.IgniteThread.
> It will:
> 1. make project code more consistent
> 2. bind every thread to a specific Ignite instance
> 3. In the future, this will allow inlining code related to the operation 
> context, for example:
> * Automatically capture the operation context when starting a thread
> * Assertions related to Operation Context



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

Reply via email to