Guys, I am not sure I like this approach, especially for this code:
f1=cache.getAsync(key1); f2=cache.getAsync(key2); You cannot complete f2 before f1. If you do, the code is unusable and it is impossible to predict anything. If you need to get 2 elements asynchronously, use getAllAsync() instead. Let's not introduce such usability issues into our API and stop trying to fix what's not broken. I propose to close the ticket as "Won't Fix". D. On Fri, May 11, 2018 at 6:14 PM, Dmitriy Govorukhin < dmitriy.govoruk...@gmail.com> wrote: > Igniters, > > I created the issue. IGNITE-8475 > <https://issues.apache.org/jira/browse/IGNITE-8475> > > Any comments are welcome. > > On Fri, May 11, 2018 at 6:32 PM, Ivan Rakov <ivan.glu...@gmail.com> wrote: > > > Agree. "fair" is more descriptive. > > > > Best Regards, > > Ivan Rakov > > > > > > On 11.05.2018 18:30, Dmitriy Govorukhin wrote: > > > >> Ivan, > >> > >> My suggestion "withFairAsync()". What do you think? > >> > >> On Fri, May 11, 2018 at 6:23 PM, Ivan Rakov <ivan.glu...@gmail.com> > >> wrote: > >> > >> I think, the best option from API side is to add decorating > >>> withExplicitAsync() method. > >>> We already have withKeepBinary, withExpiryPolicy and so on. > >>> > >>> Best Regards, > >>> Ivan Rakov > >>> > >>> > >>> On 11.05.2018 18:18, Dmitriy Govorukhin wrote: > >>> > >>> Vladimir, > >>>> > >>>> Should we create the new cache adapter or rework GridCacheAdapter? > >>>> > >>>> On Fri, May 11, 2018 at 5:52 PM, Vladimir Ozerov < > voze...@gridgain.com> > >>>> wrote: > >>>> > >>>> +1 > >>>> > >>>>> This would also be helpful for transactional SQL as it would allow to > >>>>> hide > >>>>> network latency. But there is a problem - deadlocks. We need to > inform > >>>>> user > >>>>> that this mode should be used with great care. > >>>>> > >>>>> On Fri, May 11, 2018 at 5:21 PM, Dmitriy Govorukhin < > >>>>> dmitriy.govoruk...@gmail.com> wrote: > >>>>> > >>>>> Hi Igniters, > >>>>> > >>>>>> I have a question. Why our async operation in not really async? > >>>>>> > >>>>>> GridCacheAdapter.syncOp has awaitLastFut(); this call wait last > async > >>>>>> operation completed. > >>>>>> > >>>>>> This means all async operation in one thread will be executed one by > >>>>>> one > >>>>>> but not in parallel. Async operation is not async. > >>>>>> > >>>>>> Example for atomic cache > >>>>>> > >>>>>> f1=cache.getAsync(key1); > >>>>>> f2=cache.getAsync(key2); > >>>>>> > >>>>>> f1 always will be complete before f2. > >>>>>> > >>>>>> I want to have the ability run multiple async operations in one > >>>>>> thread. > >>>>>> What do you think? > >>>>>> > >>>>>> Maybe we can add new cache adapter with fair async operations? > >>>>>> > >>>>>> > >>>>>> > > >