read through not work

classic Classic list List threaded Threaded
2 messages Options
kevin.zheng kevin.zheng
Reply | Threaded
Open this post in threaded view

read through not work

Hi  there,

I am trying to load a data record via read through method from cache.

My cache configuration set read through to true, my cache key is an object with 5 fields, 2 of them might be null.

When I called the following functions :

IgniteCache<MetaUniqueIndexKey, BinaryObject> binaryCache = cache.withKeepBinary();

BinaryObject v1 = binaryCache.get(key1);  

I got null, (the cache is empty, however the record is ready in the database, it does not automatically load into cache).


When I check the log file, I notice that there is no error message, only one warning. The log message contains the following information:

[20:00:05,476][INFO][main][GridDiscoveryManager] Topology snapshot [ver=277, servers=3, clients=0, CPUs=20, heap=20.0GB]

[20:00:11,388][WARNING][main][GridDhtColocatedCache] <com.huawei.soa.ignite.model.IgniteMetaUniqueField_Cache> For best performance you should implement for all cache keys and values: com.huawei.soa.ignite.model.MetaUniqueIndexKey

[20:00:11,711][INFO][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary

[20:00:11,796][INFO][main][GridCacheProcessor] Stopped cache: null

[20:00:11,797][INFO][main][GridCacheProcessor] Stopped cache: ignite-marshaller-sys-cache

[20:00:11,797][INFO][main][GridCacheProcessor] Stopped cache: ignite-sys-cache

[20:00:11,797][INFO][main][GridCacheProcessor] Stopped cache: ignite-atomics-sys-cache



Anyone know what’s wrong here?



Many thanks,


vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view

Re: read through not work

Hi Kevin,

Do you have the cache store configured? Is its load() method ever called? If yes, are you sure that it properly returns non-null value?

For more details about cache store configuration, see this page: