You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Vladimir Ozerov <vo...@gridgain.com> on 2015/06/29 14:35:52 UTC

Incorrect exception is thrown in async mode when partial update occurs.

Igniters,

I noted that in async mode we throw IgniteException in case of partial
update, while CachePartialUpdateException is expected here accoring to our
contract.

This appears to be pretty critical as user cannot get failed keys when
working in async mode. I created a ticket for that:
https://issues.apache.org/jira/browse/IGNITE-1059

Can someone look at it?

Vladimir.

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Atri Sharma <at...@gmail.com>.
Thank you so much!

On Wed, Jul 1, 2015 at 7:23 PM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Atri,
>
> Tests passed. I merged the changes.
>
> On Wed, Jul 1, 2015 at 1:30 PM, Atri Sharma <at...@gmail.com> wrote:
>
> > Vladimir,
> >
> > Thanks for review of patch. Are we looking at committing this today,
> > please?
> >
> > Regards,
> >
> > Atri
> >
> > On Tue, Jun 30, 2015 at 9:42 PM, Atri Sharma <at...@gmail.com>
> wrote:
> >
> > > Hi,
> > >
> > > I have uploaded patch for this.
> > >
> > > I am not sure about internal flow hence might be missing some part.
> > Please
> > > advice if same.
> > >
> > > Please see and let me know your comments and feedback.
> > >
> > > Regards,
> > >
> > > Atri
> > >
> > > On Tue, Jun 30, 2015 at 3:18 PM, Vladimir Ozerov <vozerov@gridgain.com
> >
> > > wrote:
> > >
> > >> Atri,
> > >>
> > >> I would say that this problem is specific for all calls to
> > >> IgniteCacheProxy.setFuture() method. It looks like we can create an
> > >> extension for IgniteFutureImpl class (say, IgniteCacheFutureImpl)
> which
> > >> will use CU.convertToCacheException(e) to convert exceptions instead
> of
> > >> current U.convertException(e).
> > >>
> > >> Vladimir.
> > >>
> > >> On Tue, Jun 30, 2015 at 12:29 PM, Atri Sharma <at...@gmail.com>
> > >> wrote:
> > >>
> > >> > Vladimir,
> > >> >
> > >> > Is this problem specific to all checks of isAsync() calls?
> > >> >
> > >> > On Mon, Jun 29, 2015 at 6:29 PM, Vladimir Ozerov <
> > vozerov@gridgain.com>
> > >> > wrote:
> > >> >
> > >> > > Atri,
> > >> > >
> > >> > > Currently allmost all exceptions occurring in Ignite kernal are
> > >> checked.
> > >> > > And if we want to expose them to users, we convert them to their
> > >> > unchecked
> > >> > > counterparts. The same goes for partial update exception: there is
> > >> > > CachePartialUpdateCheckedException
> > >> > > which is thrown in Ignite internals, and there is
> > >> > > CachePartialUpdateException
> > >> > > which is thrown to user. Conversion between there two excpetion
> > types
> > >> > > occurs in the method GridCacheUtils.convertToCacheException.
> > >> > >
> > >> > > Obviously, we forgot to convert exceptions in async mode. As a
> > result,
> > >> > > instead of throwing user exception, we throw IgniteException with
> > >> inner
> > >> > > CachePartialUpdateCheckedException. See how we process PUT ALL
> > >> > > operation in IgniteCacheProxy.putAll()
> > >> > > - we catch and convert exception in sync mode, but do not do that
> > for
> > >> > async
> > >> > > future.
> > >> > >
> > >> > > It appears, that not only PUT ALL, but almost all other operations
> > are
> > >> > > affected, so a kind of generic solutino is required here.
> > >> > >
> > >> > > Vladimir.
> > >> > >
> > >> > > On Mon, Jun 29, 2015 at 3:45 PM, Atri Sharma <atri.jiit@gmail.com
> >
> > >> > wrote:
> > >> > >
> > >> > > > I have taken the patch.
> > >> > > >
> > >> > > > Please advice on how to implement this. I will get the patch out
> > >> today
> > >> > > > since its critical.
> > >> > > >
> > >> > > > On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <
> > >> vozerov@gridgain.com
> > >> > >
> > >> > > > wrote:
> > >> > > >
> > >> > > > > Igniters,
> > >> > > > >
> > >> > > > > I noted that in async mode we throw IgniteException in case of
> > >> > partial
> > >> > > > > update, while CachePartialUpdateException is expected here
> > >> accoring
> > >> > to
> > >> > > > our
> > >> > > > > contract.
> > >> > > > >
> > >> > > > > This appears to be pretty critical as user cannot get failed
> > keys
> > >> > when
> > >> > > > > working in async mode. I created a ticket for that:
> > >> > > > > https://issues.apache.org/jira/browse/IGNITE-1059
> > >> > > > >
> > >> > > > > Can someone look at it?
> > >> > > > >
> > >> > > > > Vladimir.
> > >> > > > >
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > --
> > >> > > > Regards,
> > >> > > >
> > >> > > > Atri
> > >> > > > *l'apprenant*
> > >> > > >
> > >> > >
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Regards,
> > >> >
> > >> > Atri
> > >> > *l'apprenant*
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > > Regards,
> > >
> > > Atri
> > > *l'apprenant*
> > >
> >
> >
> >
> > --
> > Regards,
> >
> > Atri
> > *l'apprenant*
> >
>



-- 
Regards,

Atri
*l'apprenant*

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Atri,

Tests passed. I merged the changes.

On Wed, Jul 1, 2015 at 1:30 PM, Atri Sharma <at...@gmail.com> wrote:

> Vladimir,
>
> Thanks for review of patch. Are we looking at committing this today,
> please?
>
> Regards,
>
> Atri
>
> On Tue, Jun 30, 2015 at 9:42 PM, Atri Sharma <at...@gmail.com> wrote:
>
> > Hi,
> >
> > I have uploaded patch for this.
> >
> > I am not sure about internal flow hence might be missing some part.
> Please
> > advice if same.
> >
> > Please see and let me know your comments and feedback.
> >
> > Regards,
> >
> > Atri
> >
> > On Tue, Jun 30, 2015 at 3:18 PM, Vladimir Ozerov <vo...@gridgain.com>
> > wrote:
> >
> >> Atri,
> >>
> >> I would say that this problem is specific for all calls to
> >> IgniteCacheProxy.setFuture() method. It looks like we can create an
> >> extension for IgniteFutureImpl class (say, IgniteCacheFutureImpl) which
> >> will use CU.convertToCacheException(e) to convert exceptions instead of
> >> current U.convertException(e).
> >>
> >> Vladimir.
> >>
> >> On Tue, Jun 30, 2015 at 12:29 PM, Atri Sharma <at...@gmail.com>
> >> wrote:
> >>
> >> > Vladimir,
> >> >
> >> > Is this problem specific to all checks of isAsync() calls?
> >> >
> >> > On Mon, Jun 29, 2015 at 6:29 PM, Vladimir Ozerov <
> vozerov@gridgain.com>
> >> > wrote:
> >> >
> >> > > Atri,
> >> > >
> >> > > Currently allmost all exceptions occurring in Ignite kernal are
> >> checked.
> >> > > And if we want to expose them to users, we convert them to their
> >> > unchecked
> >> > > counterparts. The same goes for partial update exception: there is
> >> > > CachePartialUpdateCheckedException
> >> > > which is thrown in Ignite internals, and there is
> >> > > CachePartialUpdateException
> >> > > which is thrown to user. Conversion between there two excpetion
> types
> >> > > occurs in the method GridCacheUtils.convertToCacheException.
> >> > >
> >> > > Obviously, we forgot to convert exceptions in async mode. As a
> result,
> >> > > instead of throwing user exception, we throw IgniteException with
> >> inner
> >> > > CachePartialUpdateCheckedException. See how we process PUT ALL
> >> > > operation in IgniteCacheProxy.putAll()
> >> > > - we catch and convert exception in sync mode, but do not do that
> for
> >> > async
> >> > > future.
> >> > >
> >> > > It appears, that not only PUT ALL, but almost all other operations
> are
> >> > > affected, so a kind of generic solutino is required here.
> >> > >
> >> > > Vladimir.
> >> > >
> >> > > On Mon, Jun 29, 2015 at 3:45 PM, Atri Sharma <at...@gmail.com>
> >> > wrote:
> >> > >
> >> > > > I have taken the patch.
> >> > > >
> >> > > > Please advice on how to implement this. I will get the patch out
> >> today
> >> > > > since its critical.
> >> > > >
> >> > > > On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <
> >> vozerov@gridgain.com
> >> > >
> >> > > > wrote:
> >> > > >
> >> > > > > Igniters,
> >> > > > >
> >> > > > > I noted that in async mode we throw IgniteException in case of
> >> > partial
> >> > > > > update, while CachePartialUpdateException is expected here
> >> accoring
> >> > to
> >> > > > our
> >> > > > > contract.
> >> > > > >
> >> > > > > This appears to be pretty critical as user cannot get failed
> keys
> >> > when
> >> > > > > working in async mode. I created a ticket for that:
> >> > > > > https://issues.apache.org/jira/browse/IGNITE-1059
> >> > > > >
> >> > > > > Can someone look at it?
> >> > > > >
> >> > > > > Vladimir.
> >> > > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > Regards,
> >> > > >
> >> > > > Atri
> >> > > > *l'apprenant*
> >> > > >
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Regards,
> >> >
> >> > Atri
> >> > *l'apprenant*
> >> >
> >>
> >
> >
> >
> > --
> > Regards,
> >
> > Atri
> > *l'apprenant*
> >
>
>
>
> --
> Regards,
>
> Atri
> *l'apprenant*
>

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Atri Sharma <at...@gmail.com>.
Vladimir,

Thanks for review of patch. Are we looking at committing this today, please?

Regards,

Atri

On Tue, Jun 30, 2015 at 9:42 PM, Atri Sharma <at...@gmail.com> wrote:

> Hi,
>
> I have uploaded patch for this.
>
> I am not sure about internal flow hence might be missing some part. Please
> advice if same.
>
> Please see and let me know your comments and feedback.
>
> Regards,
>
> Atri
>
> On Tue, Jun 30, 2015 at 3:18 PM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
>> Atri,
>>
>> I would say that this problem is specific for all calls to
>> IgniteCacheProxy.setFuture() method. It looks like we can create an
>> extension for IgniteFutureImpl class (say, IgniteCacheFutureImpl) which
>> will use CU.convertToCacheException(e) to convert exceptions instead of
>> current U.convertException(e).
>>
>> Vladimir.
>>
>> On Tue, Jun 30, 2015 at 12:29 PM, Atri Sharma <at...@gmail.com>
>> wrote:
>>
>> > Vladimir,
>> >
>> > Is this problem specific to all checks of isAsync() calls?
>> >
>> > On Mon, Jun 29, 2015 at 6:29 PM, Vladimir Ozerov <vo...@gridgain.com>
>> > wrote:
>> >
>> > > Atri,
>> > >
>> > > Currently allmost all exceptions occurring in Ignite kernal are
>> checked.
>> > > And if we want to expose them to users, we convert them to their
>> > unchecked
>> > > counterparts. The same goes for partial update exception: there is
>> > > CachePartialUpdateCheckedException
>> > > which is thrown in Ignite internals, and there is
>> > > CachePartialUpdateException
>> > > which is thrown to user. Conversion between there two excpetion types
>> > > occurs in the method GridCacheUtils.convertToCacheException.
>> > >
>> > > Obviously, we forgot to convert exceptions in async mode. As a result,
>> > > instead of throwing user exception, we throw IgniteException with
>> inner
>> > > CachePartialUpdateCheckedException. See how we process PUT ALL
>> > > operation in IgniteCacheProxy.putAll()
>> > > - we catch and convert exception in sync mode, but do not do that for
>> > async
>> > > future.
>> > >
>> > > It appears, that not only PUT ALL, but almost all other operations are
>> > > affected, so a kind of generic solutino is required here.
>> > >
>> > > Vladimir.
>> > >
>> > > On Mon, Jun 29, 2015 at 3:45 PM, Atri Sharma <at...@gmail.com>
>> > wrote:
>> > >
>> > > > I have taken the patch.
>> > > >
>> > > > Please advice on how to implement this. I will get the patch out
>> today
>> > > > since its critical.
>> > > >
>> > > > On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <
>> vozerov@gridgain.com
>> > >
>> > > > wrote:
>> > > >
>> > > > > Igniters,
>> > > > >
>> > > > > I noted that in async mode we throw IgniteException in case of
>> > partial
>> > > > > update, while CachePartialUpdateException is expected here
>> accoring
>> > to
>> > > > our
>> > > > > contract.
>> > > > >
>> > > > > This appears to be pretty critical as user cannot get failed keys
>> > when
>> > > > > working in async mode. I created a ticket for that:
>> > > > > https://issues.apache.org/jira/browse/IGNITE-1059
>> > > > >
>> > > > > Can someone look at it?
>> > > > >
>> > > > > Vladimir.
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Regards,
>> > > >
>> > > > Atri
>> > > > *l'apprenant*
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Atri
>> > *l'apprenant*
>> >
>>
>
>
>
> --
> Regards,
>
> Atri
> *l'apprenant*
>



-- 
Regards,

Atri
*l'apprenant*

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Atri Sharma <at...@gmail.com>.
Hi,

I have uploaded patch for this.

I am not sure about internal flow hence might be missing some part. Please
advice if same.

Please see and let me know your comments and feedback.

Regards,

Atri

On Tue, Jun 30, 2015 at 3:18 PM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Atri,
>
> I would say that this problem is specific for all calls to
> IgniteCacheProxy.setFuture() method. It looks like we can create an
> extension for IgniteFutureImpl class (say, IgniteCacheFutureImpl) which
> will use CU.convertToCacheException(e) to convert exceptions instead of
> current U.convertException(e).
>
> Vladimir.
>
> On Tue, Jun 30, 2015 at 12:29 PM, Atri Sharma <at...@gmail.com> wrote:
>
> > Vladimir,
> >
> > Is this problem specific to all checks of isAsync() calls?
> >
> > On Mon, Jun 29, 2015 at 6:29 PM, Vladimir Ozerov <vo...@gridgain.com>
> > wrote:
> >
> > > Atri,
> > >
> > > Currently allmost all exceptions occurring in Ignite kernal are
> checked.
> > > And if we want to expose them to users, we convert them to their
> > unchecked
> > > counterparts. The same goes for partial update exception: there is
> > > CachePartialUpdateCheckedException
> > > which is thrown in Ignite internals, and there is
> > > CachePartialUpdateException
> > > which is thrown to user. Conversion between there two excpetion types
> > > occurs in the method GridCacheUtils.convertToCacheException.
> > >
> > > Obviously, we forgot to convert exceptions in async mode. As a result,
> > > instead of throwing user exception, we throw IgniteException with inner
> > > CachePartialUpdateCheckedException. See how we process PUT ALL
> > > operation in IgniteCacheProxy.putAll()
> > > - we catch and convert exception in sync mode, but do not do that for
> > async
> > > future.
> > >
> > > It appears, that not only PUT ALL, but almost all other operations are
> > > affected, so a kind of generic solutino is required here.
> > >
> > > Vladimir.
> > >
> > > On Mon, Jun 29, 2015 at 3:45 PM, Atri Sharma <at...@gmail.com>
> > wrote:
> > >
> > > > I have taken the patch.
> > > >
> > > > Please advice on how to implement this. I will get the patch out
> today
> > > > since its critical.
> > > >
> > > > On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <
> vozerov@gridgain.com
> > >
> > > > wrote:
> > > >
> > > > > Igniters,
> > > > >
> > > > > I noted that in async mode we throw IgniteException in case of
> > partial
> > > > > update, while CachePartialUpdateException is expected here accoring
> > to
> > > > our
> > > > > contract.
> > > > >
> > > > > This appears to be pretty critical as user cannot get failed keys
> > when
> > > > > working in async mode. I created a ticket for that:
> > > > > https://issues.apache.org/jira/browse/IGNITE-1059
> > > > >
> > > > > Can someone look at it?
> > > > >
> > > > > Vladimir.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > >
> > > > Atri
> > > > *l'apprenant*
> > > >
> > >
> >
> >
> >
> > --
> > Regards,
> >
> > Atri
> > *l'apprenant*
> >
>



-- 
Regards,

Atri
*l'apprenant*

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Atri,

I would say that this problem is specific for all calls to
IgniteCacheProxy.setFuture() method. It looks like we can create an
extension for IgniteFutureImpl class (say, IgniteCacheFutureImpl) which
will use CU.convertToCacheException(e) to convert exceptions instead of
current U.convertException(e).

Vladimir.

On Tue, Jun 30, 2015 at 12:29 PM, Atri Sharma <at...@gmail.com> wrote:

> Vladimir,
>
> Is this problem specific to all checks of isAsync() calls?
>
> On Mon, Jun 29, 2015 at 6:29 PM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
> > Atri,
> >
> > Currently allmost all exceptions occurring in Ignite kernal are checked.
> > And if we want to expose them to users, we convert them to their
> unchecked
> > counterparts. The same goes for partial update exception: there is
> > CachePartialUpdateCheckedException
> > which is thrown in Ignite internals, and there is
> > CachePartialUpdateException
> > which is thrown to user. Conversion between there two excpetion types
> > occurs in the method GridCacheUtils.convertToCacheException.
> >
> > Obviously, we forgot to convert exceptions in async mode. As a result,
> > instead of throwing user exception, we throw IgniteException with inner
> > CachePartialUpdateCheckedException. See how we process PUT ALL
> > operation in IgniteCacheProxy.putAll()
> > - we catch and convert exception in sync mode, but do not do that for
> async
> > future.
> >
> > It appears, that not only PUT ALL, but almost all other operations are
> > affected, so a kind of generic solutino is required here.
> >
> > Vladimir.
> >
> > On Mon, Jun 29, 2015 at 3:45 PM, Atri Sharma <at...@gmail.com>
> wrote:
> >
> > > I have taken the patch.
> > >
> > > Please advice on how to implement this. I will get the patch out today
> > > since its critical.
> > >
> > > On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <vozerov@gridgain.com
> >
> > > wrote:
> > >
> > > > Igniters,
> > > >
> > > > I noted that in async mode we throw IgniteException in case of
> partial
> > > > update, while CachePartialUpdateException is expected here accoring
> to
> > > our
> > > > contract.
> > > >
> > > > This appears to be pretty critical as user cannot get failed keys
> when
> > > > working in async mode. I created a ticket for that:
> > > > https://issues.apache.org/jira/browse/IGNITE-1059
> > > >
> > > > Can someone look at it?
> > > >
> > > > Vladimir.
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > >
> > > Atri
> > > *l'apprenant*
> > >
> >
>
>
>
> --
> Regards,
>
> Atri
> *l'apprenant*
>

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Atri Sharma <at...@gmail.com>.
Vladimir,

Is this problem specific to all checks of isAsync() calls?

On Mon, Jun 29, 2015 at 6:29 PM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Atri,
>
> Currently allmost all exceptions occurring in Ignite kernal are checked.
> And if we want to expose them to users, we convert them to their unchecked
> counterparts. The same goes for partial update exception: there is
> CachePartialUpdateCheckedException
> which is thrown in Ignite internals, and there is
> CachePartialUpdateException
> which is thrown to user. Conversion between there two excpetion types
> occurs in the method GridCacheUtils.convertToCacheException.
>
> Obviously, we forgot to convert exceptions in async mode. As a result,
> instead of throwing user exception, we throw IgniteException with inner
> CachePartialUpdateCheckedException. See how we process PUT ALL
> operation in IgniteCacheProxy.putAll()
> - we catch and convert exception in sync mode, but do not do that for async
> future.
>
> It appears, that not only PUT ALL, but almost all other operations are
> affected, so a kind of generic solutino is required here.
>
> Vladimir.
>
> On Mon, Jun 29, 2015 at 3:45 PM, Atri Sharma <at...@gmail.com> wrote:
>
> > I have taken the patch.
> >
> > Please advice on how to implement this. I will get the patch out today
> > since its critical.
> >
> > On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <vo...@gridgain.com>
> > wrote:
> >
> > > Igniters,
> > >
> > > I noted that in async mode we throw IgniteException in case of partial
> > > update, while CachePartialUpdateException is expected here accoring to
> > our
> > > contract.
> > >
> > > This appears to be pretty critical as user cannot get failed keys when
> > > working in async mode. I created a ticket for that:
> > > https://issues.apache.org/jira/browse/IGNITE-1059
> > >
> > > Can someone look at it?
> > >
> > > Vladimir.
> > >
> >
> >
> >
> > --
> > Regards,
> >
> > Atri
> > *l'apprenant*
> >
>



-- 
Regards,

Atri
*l'apprenant*

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Atri Sharma <at...@gmail.com>.
Let me hack this and report

On Mon, Jun 29, 2015 at 6:29 PM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Atri,
>
> Currently allmost all exceptions occurring in Ignite kernal are checked.
> And if we want to expose them to users, we convert them to their unchecked
> counterparts. The same goes for partial update exception: there is
> CachePartialUpdateCheckedException
> which is thrown in Ignite internals, and there is
> CachePartialUpdateException
> which is thrown to user. Conversion between there two excpetion types
> occurs in the method GridCacheUtils.convertToCacheException.
>
> Obviously, we forgot to convert exceptions in async mode. As a result,
> instead of throwing user exception, we throw IgniteException with inner
> CachePartialUpdateCheckedException. See how we process PUT ALL
> operation in IgniteCacheProxy.putAll()
> - we catch and convert exception in sync mode, but do not do that for async
> future.
>
> It appears, that not only PUT ALL, but almost all other operations are
> affected, so a kind of generic solutino is required here.
>
> Vladimir.
>
> On Mon, Jun 29, 2015 at 3:45 PM, Atri Sharma <at...@gmail.com> wrote:
>
> > I have taken the patch.
> >
> > Please advice on how to implement this. I will get the patch out today
> > since its critical.
> >
> > On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <vo...@gridgain.com>
> > wrote:
> >
> > > Igniters,
> > >
> > > I noted that in async mode we throw IgniteException in case of partial
> > > update, while CachePartialUpdateException is expected here accoring to
> > our
> > > contract.
> > >
> > > This appears to be pretty critical as user cannot get failed keys when
> > > working in async mode. I created a ticket for that:
> > > https://issues.apache.org/jira/browse/IGNITE-1059
> > >
> > > Can someone look at it?
> > >
> > > Vladimir.
> > >
> >
> >
> >
> > --
> > Regards,
> >
> > Atri
> > *l'apprenant*
> >
>



-- 
Regards,

Atri
*l'apprenant*

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Atri,

Currently allmost all exceptions occurring in Ignite kernal are checked.
And if we want to expose them to users, we convert them to their unchecked
counterparts. The same goes for partial update exception: there is
CachePartialUpdateCheckedException
which is thrown in Ignite internals, and there is CachePartialUpdateException
which is thrown to user. Conversion between there two excpetion types
occurs in the method GridCacheUtils.convertToCacheException.

Obviously, we forgot to convert exceptions in async mode. As a result,
instead of throwing user exception, we throw IgniteException with inner
CachePartialUpdateCheckedException. See how we process PUT ALL
operation in IgniteCacheProxy.putAll()
- we catch and convert exception in sync mode, but do not do that for async
future.

It appears, that not only PUT ALL, but almost all other operations are
affected, so a kind of generic solutino is required here.

Vladimir.

On Mon, Jun 29, 2015 at 3:45 PM, Atri Sharma <at...@gmail.com> wrote:

> I have taken the patch.
>
> Please advice on how to implement this. I will get the patch out today
> since its critical.
>
> On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
> > Igniters,
> >
> > I noted that in async mode we throw IgniteException in case of partial
> > update, while CachePartialUpdateException is expected here accoring to
> our
> > contract.
> >
> > This appears to be pretty critical as user cannot get failed keys when
> > working in async mode. I created a ticket for that:
> > https://issues.apache.org/jira/browse/IGNITE-1059
> >
> > Can someone look at it?
> >
> > Vladimir.
> >
>
>
>
> --
> Regards,
>
> Atri
> *l'apprenant*
>

Re: Incorrect exception is thrown in async mode when partial update occurs.

Posted by Atri Sharma <at...@gmail.com>.
I have taken the patch.

Please advice on how to implement this. I will get the patch out today
since its critical.

On Mon, Jun 29, 2015 at 6:05 PM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Igniters,
>
> I noted that in async mode we throw IgniteException in case of partial
> update, while CachePartialUpdateException is expected here accoring to our
> contract.
>
> This appears to be pretty critical as user cannot get failed keys when
> working in async mode. I created a ticket for that:
> https://issues.apache.org/jira/browse/IGNITE-1059
>
> Can someone look at it?
>
> Vladimir.
>



-- 
Regards,

Atri
*l'apprenant*