-->
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.  [ 3 posts ] 
Author Message
 Post subject: slave: could not open file (3.3 beta2)
PostPosted: Tue Oct 26, 2010 3:16 pm 
Beginner
Beginner

Joined: Thu Nov 20, 2003 10:16 pm
Posts: 28
Location: Los Angeles, CA
I have a master/slave setup, with a single master and slave instance running over JMS on the SAME localhost (no NFS involved). My master instance, in addition to processing index-update requests from the queue, also runs a task on a cron schedule to regularly purge and rebuild the indices from the latest db data. This all seems to work fine.

However, every so often, on the slave side, I get the following error:

Code:
ERROR [pool-4-thread-1] (FileHelper.java:198) delete -  Could not delete C:\Users\mogleym\Scratch\csmc\mds\lucene\dev\slave\org.csmc.mds.model.Physician\2\_10.cfs


I looked at the Hibernate search code and all it's doing is attempting a file.delete on the corresponding handle. But for some reason, that file is locked even though the slave instance has exclusive access to it. Could this be a case of the initial copy from the source not properly releasing the lock? Anyone else seen this?

Windows XP SP3 / Hibernate Search 3.3 Beta2 / Lucene 3.0.2

Michael


Top
 Profile  
 
 Post subject: Re: slave: could not open file (3.3 beta2)
PostPosted: Fri Oct 29, 2010 4:45 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
This could be Windows holding a file lock longer that it should. Deleting files on Windows is always harder than on a Unix based system. The error most likely comes from the synchronization code when the new master index gets copied into the new slave index directory. The process tries to delete in the new slave index directory which don't exist in the new master index. Even if such a deletion fails it will not have a direct impact on the result. In the worst case the file gets copied on a later switch. It will however not be used by Lucene once the index switch occurs.
Do you have any reason to believe that an index corruption occurs? Watch the file across multiple index switches. I am pretty sure it will disappear. Maybe we should reduce the log level in this case!?

--Hardy


Top
 Profile  
 
 Post subject: Re: slave: could not open file (3.3 beta2)
PostPosted: Fri Oct 29, 2010 1:42 pm 
Beginner
Beginner

Joined: Thu Nov 20, 2003 10:16 pm
Posts: 28
Location: Los Angeles, CA
Thanks, Hardy. I have no reason to think the source index is corrupted. If what you're saying is true, it would be nice to have the log change to a warning so my sys admin doesn't freak out.


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

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.