You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Zhengqingzheng <zh...@huawei.com> on 2016/05/19 12:35:12 UTC

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 java.io.Externalizable 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,
Kevin

Re: read through not work

Posted by vkulichenko <va...@gmail.com>.
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:
https://apacheignite.readme.io/docs/persistent-store

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/read-through-not-work-tp5028p5051.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.