-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: timestamp is not updated in remote node in clustering
PostPosted: Mon Jul 07, 2008 5:54 pm 
Newbie

Joined: Mon Jul 07, 2008 5:24 pm
Posts: 1
Hibernate version: 3.2.4

Hi there,

I'm new in hibernate and I have a problem on enabling 2nd level cache and query cache.
I'm not sure if this is the correct place to ask for this issue.

Basically, I have 2 servers that are using clustering (implemented with OSCache). For example, data A exists on my database table with value 1.

Then I did this:
Server 1: Query for A, get value 1
Server 2: Update A with value 2
Server 1: With the same session as before, query again for A, got value 1 when it should've been 2

After debugging the code and enabling hibernate+oscache logs, I found out:
1. Cache key for the entity I'm updating is flushed on Server 1 and 2 (flush notification is succesfully sent to Server 1)
2. However, when querying the second time, query cache doesn't check if this key is flushed, so it grabs the old result from the first query
3. Apparently, UpdateTimestampsCache that is added and updated in Server 2, doesn't get sent to Server 1, so Server 1's UpdateTimestampsCache is never updated. That's why the second query simply grabs the old result because it sees that the timestamps doesn't change.

Can somebody help me with this problem?
I have tried to debug this for the past 1 week and research on this issue, as well as read Hibernate manual but I found no solution.

For your reference, I'm using the latest OSCache 2.4.1 with OSCacheProvider from OScache.

Please let me know if you need more details from me..
Thanks a lot in advance!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.