Hi Kevin,

Thanks for the code, this always makes it much easier to investigate!

The behavior you observe is caused by the fact that you modify the new
value. You should create a new instance instead and return it from the
interceptor. I.e., instead of:

newVal.setMyInt(newVal.getMyInt() + 1);

you should do:

newVal = new TestValue(newVal.getMyInt() + 1);

As for read-through, you're right - we never load on put() operation, but I
think we should if interceptor is used. I created a ticket for this:
https://issues.apache.org/jira/browse/IGNITE-1532. For now you can use
getAndPut() method instead. It returns the previous value and therefore
loads it from the store if needed. Note that you also need to add this to
the cache configuration to make it work:

cacheConfiguration.setLoadPreviousValue(true);

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/CacheStore-implementation-using-Hibernate-tp1423p1462.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to