I have a Lucene Index on a central file system. In my IIS application, I have methods to query the index and another to update the index.
To update the index, I have to lock the file until the changes are committed. My problem in implementing this is choosing the best design pattern to maintain good concurrency.
Am I best off using a static updater class that uses a lock about a static object? If another request to update the index comes in while the lock is active, will the request 'wait' or will it return an exception? If it cannot wait, should I implement a thread safe FIFO type object with the series of operations to conduct sequentially?