On Fri, Nov 13, 2009 at 11:02 PM, Otis Gospodnetic <otis_gospodne...@yahoo.com> wrote: > 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".
Exactly right, Otis. > I don't have the Solr source handy, but if I did, I'd look for "Shutdown", > "Hook" and "finalize" in the code. Thanks for the direction. There was some talk of close()ing a SolrCore that I found, but I don't believe this meant a commit. I somehow hadn't thought of actually *trying* to add a doc and then shut down a Solr instance; shame on me. Unfortunately, when I test this via * make a new solr * add a doc * commit * verify it shows up in a search -- it does * add a 2nd doc * shutdown solr doesn't stop. It stops accepting connections, but java refuses to actually die. Not sure what we're doing wrong on our end, but I see this frequently and end up having to do a kill (usually not -9!). I guess we'll stick with externally tracking which docs have committed, so that when we inevitably have to kill Solr it doesn't cause a problem. Michael