[jboss-user] [JBossCache] - Re: uninitialized nodes

manik.surtani@jboss.com do-not-reply at jboss.com
Mon Jul 16 19:36:23 EDT 2007


"aditsu" wrote : 
  | I didn't put(node, key, value), but put(fqn, map). And it didn't load it from the cacheloader, until I tried to "get" something.
  | 

That is a bug.  (I've updated JBCACHE-1133) 

This is now fixed in HEAD with an updated unit test, and now:

*  put(Fqn, Key, Value) triggers a load (because of return values needed)
*  put(Fqn, Map) does not trigger a load
*  get(Fqn, Key) does not trigger a load if the key is in memory, even if dataLoaded is false.

The last case can happen when:

1) create a new node - put(fqn, key, value)
2) node is evicted
3) put more data in the node - put(fqn, map) - node not loaded so dataLoaded = false.
4) get(fqn, k2) - if k2 exists in memory due to the put in 3), node is still not loaded and dataLoaded is left at false.

See UnnecessaryLoadingTest in CVS for details.

"aditsu" wrote : 
  | It should also not write that data to the cacheloader (this is yet another issue, I used a workaround for that too). The ultimate goal is to do my own optimized preloading of data from a database.
  | 

This bit I don't understand.  Even if you're doing a put(Fqn, Map) and you don't want to load data from the loader, I can't imagine why you wouldn't want the data written TO the cacheloader.  Beats the fundamental purpose of a cache loader if this doesn't happen.




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064787#4064787

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064787



More information about the jboss-user mailing list