ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Semyon Boikov <sboi...@gridgain.com>
Subject Re: JCache read-through behavior
Date Tue, 20 Jan 2015 15:27:32 GMT
This behavior is clearly stated in JCache spec, also there are
corresponding TCK tests (see
CacheLoaderTest.shouldNotLoadUsingPutIfAbsent,
CacheLoaderTest.shouldNotLoadUsingGetAndPut).

On Tue, Jan 20, 2015 at 6:19 PM, Dmitriy Setrakyan <dsetrakyan@gridgain.com>
wrote:

> Are we absolutely certain that this is indeed the JCache behavior and not
> our misconfiguration? Do we have CacheLoader and CacheWriter configured and
> isWriteThrough() and isReadThrough() flags enabled?
>
> If yes, then we should probably have a configuration property to enable and
> disable such behavior. How about isReadThroughPreviousValue()?
>
> D.
>
> On Tue, Jan 20, 2015 at 6:44 AM, Alexey Kuznetsov <akuznetsov@gridgain.com
> >
> wrote:
>
> > But what will happen if user select Ignite to replace some JCache
> > implementation in his production application?
> > He may get unexpected behaviour. Or not?
> >
> > I think we should change current implementation to conform to JCache for
> > compatibility with other implementations and have configuration option
> for
> > our current implementation.
> >
> > On Tue, Jan 20, 2015 at 4:49 PM, Semyon Boikov <sboikov@gridgain.com>
> > wrote:
> >
> > > Hi all,
> > >
> > > I'm implementing support for JCache CacheLoader and found that
> according
> > to
> > > JCache specification read-through behavior differs from current Ignite
> > > implementation for some cases:
> > >     - in current Ignite implementation for 'putIfAbsent(K key, V
> value)'
> > if
> > > value is not in cache then it is loaded from store, but in JCache
> > > CacheLoader should not be called in this case (the same for replace(K
> > key,
> > > V oldValue, V newValue), replace(K key, V oldValue), remove(K key, V
> > > oldValue))
> > >     - in current Ignite implementation if cache method returns previous
> > > value (getAndPut, getAndRemove) and value is not in cache then it is
> > loaded
> > > from store, but in JCache CacheLoader should not be called in this case
> > >
> > > In my opinion current Ignite behavior is more correct than in JCache
> > spec.
> > > Do you think we should change current implementation to conform to
> > JCache?
> > >
> >
> >
> >
> > --
> > Alexey Kuznetsov
> > GridGain Systems
> > www.gridgain.com
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message