gerrit/gerrit-pgm
Dave Borowitz 2aacdd0e7b Lucene: don't commit the index after every write
When constructing a SearcherManager with an IndexWriter, as SubIndex
does, the returned searcher has immediate access to the unflushed
writes, so there is no need to commit after every write to make the
writes visible in the running process. This allows us to "decouple
durability to hardware/OS crashes from visibility of changes to a new
IndexReader" [1].

Since we don't know exactly when changes will get committed to disk,
start a thread to periodically refresh the SearcherManagers. The 100ms
poll time is a bit of a guess, but [1] says even 50ms should not be a
significant load.

[1] http://blog.mikemccandless.com/2011/11/near-real-time-readers-with-lucenes.html

Change-Id: I1d413e8334057e1b04f9d6414635a2d1c53507f4
2013-06-24 17:01:03 -06:00
..
.settings Remove timestamp from all org.eclipse.core.resources.prefs files. 2012-07-04 14:06:09 +02:00
src Lucene: don't commit the index after every write 2013-06-24 17:01:03 -06:00
.gitignore Add Intellij IDEA files to ignore list 2012-05-03 13:17:43 -07:00
BUCK Index modified filenames with Lucene 2013-05-29 15:06:15 -07:00