Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-603

ConcurrentMergeScheduler crashes the application if a transient error occurs

    XMLWordPrintableJSON

Details

    Description

      We are using Lucene.NET 3.0.3 within a larger application hosted in a Windows Service.  The Lucene.NET use occurs in a background processing thread and is non-critical, it shouldn't ever cause the Windows Service to crash.

      Currently if an error occurs (even a very transient error) within our implementation of Lucene.Net.Store.BufferedIndexOutput FlushBuffer() then our Windows Service crashes.  

      This is because ConcurrentMergeScheduler.HandleMergeException throws an exception, even though it is being called inside a background thread generated within the Lucene code and so the exception thrown can never be caught and will always crash the application.  The code and comments around this seem to suggest this is not expected to crash out (maybe due to the port from java and java behaves differently from .NET for this?).

      Handling all errors inside our FlushBuffer implementation causes the file to become corrupted as the flush is considered a success.

      I think this throw should be removed.  We have commented it out and this appears to have had no detrimental affect.

      Attachments

        Activity

          People

            nightowl888 Shad Storhaug
            laura.m.nash Laura Nash
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: