I am planning to make my build system run with a couple of threads whenever there is a need for a full index rebuild. One thread will handle the normal update process - indexing new content, reinserting changed documents, and deletes. The other thread will handle rebuilds at the same time.

I'm working on thread locks so the processes won't stomp on each other, but I've come across a question:

The rebuild process will take a few hours (running on all the build cores), but the update process will happen at least once every two minutes (running on the live cores). If a commit is underway on the live core, what will happen if another process asks Solr to swap the live core and the build core? Will it blow up in some way? Should my synchronization prevent these two processes from happening at the same time?

Because I will have just swapped the core out of the way of active queries, I don't actually care about the commit, but I do care about whether an exception will be thrown and that the index on the core (which is now the build core) is intact and won't cause a future rebuild to fail.

Thanks,
Shawn

Reply via email to