ID | IEP-70 |
Author | |
Sponsor | |
Created |
|
Status | DRAFT |
Cache async operations invoke future listeners on Striped pool threads:
IgniteFuture fut = cache.putAsync(1, 1); fut.listen(f -> { // Executes on Striped pool and deadlocks. cache.replace(1, 2); });
Users are supposed to be aware of this and handle it manually, however:
The problem is more pronounced in Ignite.NET:
await cache.PutAsync(1, 1); // Now we are on a Striped pool thread! // CPU-heavy method blocks the stripe and cache ops are stalled. RunSomething();
A similar problem exists for Compute. Async operation continuations are executed on the Public pool, which can lead to starvation there when all threads are taken up by continuation logic.
NOTE: This IEP is NOT related to scan query filters, cache entry processors, etc, which also run on Striped pool.
Those users can force the old behavior with `IgniteConfiguration.setAsyncContinuationExecutor(Runnable::run)`.
// Links to discussions on the devlist, if applicable.
PoC: https://github.com/apache/ignite/pull/8870