ignitetcbot commented on PR #13494:
URL: https://github.com/apache/ignite/pull/13494#issuecomment-5346738465

   AI-assisted code review found two concerns in the new dedicated executor 
implementation:
   
   1. **[P1] Executor lifecycle:** the executor is stored in a static field but 
is not registered with the Ignite node lifecycle and is never shut down. 
`IgniteThreadFactory` creates regular non-daemon threads, and the pool's core 
threads do not time out. After the first `idle_verify` or consistency repair, 
an embedded application may therefore be unable to terminate after stopping its 
last node. The pool also survives node restarts and can retain the node 
classloader. Please make the executor a node-owned resource and shut it down 
during node stop.
   
   2. **[P2] Unsafe publication:** `initOrGetVerifyExecutor` uses 
double-checked locking, but `EXECUTOR_SERVICE` is not `volatile`. The outer 
read is unsynchronized, so the Java Memory Model does not guarantee safe 
publication of the constructed `IgniteThreadPoolExecutor`. Please either make 
the field `volatile` or perform every read and initialization under the same 
lock; the test-only setter should follow the same synchronization scheme.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to