Pavel, thanks for the response. Do I understand correctly that it is not expected that a user may want to specify their own custom executor?
On Thu, Aug 19, 2021 at 6:55 PM Pavel Tupitsyn <ptupit...@apache.org> wrote: > Hi Alexander, > > To be honest, I'm not sure yet - just getting to know this new > configuration mechanism and format. > > Since we can't use a property of type Executor, we'll have to provide > predefined values. > It can either be "bool executeAsyncContinuationsDirectly": false (default) > => commonPool, true => Runnable::run, > or "String asyncContinuationExecutor" which allows two values "direct" and > "commonPool". > > I'm leaning towards the latter: > > { > "node": { > "metastorageNodes": [ "node-0" ], > "asyncContinuationExecutor": "commonPool" > }, > "network": { ... } > } > > > > On Thu, Aug 19, 2021 at 6:29 PM Alexander Polovtcev < > alexpolovt...@gmail.com> > wrote: > > > Hi, Pavel! > > > > Can you please provide an example (e.g. HOCON snippet) of how this > > configuration is going to look like in Ignite 3? Or how is this property > > going to be set? > > > > > > On Thu, Aug 19, 2021 at 6:00 PM Pavel Tupitsyn <ptupit...@apache.org> > > wrote: > > > > > Igniters, > > > > > > I propose to add a configurable async continuation executor for public > > APIs > > > to Ignite 3 > > > like we have in Ignite 2.x [1] > > > > > > In short, currently, async APIs return a future to the user code. > > > Continuations like "myCode" in "table.getAsync().thenApply(myCode)" > will > > be > > > executed by the same thread that completes the future, which will be a > > > Netty thread or some other Ignite thread. > > > > > > This is dangerous because user code can be blocking or long-running, > and > > > system threads become unavailable. > > > > > > Proposal: > > > 1. Add asyncContinuationExecutor configuration property, defaults to > > > ForkJoinPool#commonPool - both for server and thin client > > > 2. Use this executor to complete all public API futures > > > > > > This means safe default behavior and a possibility to enable unsafe but > > > faster behavior with Runnable::run executor. > > > > > > Thoughts? > > > > > > > > > [1] > > > > > > > > > https://cwiki.apache.org/confluence/display/IGNITE/IEP-70%3A+Async+Continuation+Executor > > > > > > > > > -- > > With regards, > > Aleksandr Polovtcev > > > -- With regards, Aleksandr Polovtcev