So I think the question is really: "If I stop the servlet container, does Solr issue a commit in the shutdown hook in order to ensure all buffered docs are persisted to disk before the JVM exits".
I don't have the Solr source handy, but if I did, I'd look for "Shutdown", "Hook" and "finalize" in the code. Otis -- Sematext is hiring -- http://sematext.com/about/jobs.html?mls Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR ----- Original Message ---- > From: Chris Hostetter <hossman_luc...@fucit.org> > To: solr-user@lucene.apache.org > Sent: Fri, November 13, 2009 4:09:00 PM > Subject: Re: Stop solr without losing documents > > > : which documents have been updated before a successful commit. Now > : stopping solr is as easy as kill -9. > > please don't kill -9 ... it's grossly overkill, and doesn't give your > servlet container a fair chance to cleanthings up. A lot of work has been > done to make Lucene indexes robust to hard terminations of the JVM (or > physical machine) but there's no reason to go out of your way to try and > stab it in the heart when you could just shut it down cleanly. > > that's not to say your appraoch isn't a good one -- if you only have one > client sending updates/commits then having it keep track of what was > indexed prior to the lasts successful commit is a viable way to dela with > what happens if solr stops responding (either because you shut it down, or > because it crashed for some other reason). > > Alternately, you could take advantage of the "enabled" feature from your > client (just have it test the enabled url ever N updates or so) and when > it sees that you have disabled the port it can send one last commit and > then stop sending updates until it sees the enabled URL work againg -- as > soon as you see the updates stop, you can safely shutdown hte port. > > > -Hoss