lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Rothenberg <>
Subject How to LOCK the index-dir for changes from the IndexWriter
Date Fri, 18 Jun 2010 09:28:53 GMT
im writing a RequestHandler that manages backups of the index-directory. 

Yea, i know theres already the Replication-RequestHandler that is also capable 
of creating backups, but i want the backupprocess to do some more action and 
not to depend on index-commit-points as the ReplicationHandler does. 
Reason is, we are running a custom DataImportHandler that starts a full-import 
with the option clean=false every 30 secs (That means, its doing changes to 
the current index every 30 secs). Also the importer-process never sends a 
commit (bacuse that made the whole server stuck for a few secs). 

So, i simply want to lock the index-directory with the same mechanism that is 
used when the index gets optimized. I took a look to DirectUpdateHandler2 / 
IndexWriter etc to find out what kind of lock is used but was not successful 
in implementing it to my RequestHandler :(

The big advantage of locking the index-dir would be that i dont have to stop 
the index-updating process. the import would automatically hold on until the 
lock is removed and the backup got finished. 

Regards, Alex

Alexander Rothenberg
Fotofinder GmbH		USt-IdNr. DE812854514
Software Entwicklung	Web:
Potsdamer Str. 96	Tel: +49 30 25792890
10785 Berlin		Fax: +49 30 257928999

Geschäftsführer:	Ali Paczensky
Amtsgericht:		Berlin Charlottenburg (HRB 73099)
Sitz:			Berlin

View raw message