elasticsearch/elasticsearch — pull request #6443 by mikemccand (2014-06-09 21:19:48+00:00)
Title: Indexing: force refresh when versionMap is using too much RAM

If the user sets a high refresh interval, the versionMap can use
unbounded RAM. I fixed LiveVersionMap to track its RAM used, and
trigger refresh if it's > 25% of IW's RAM buffer. (We could add
another setting for this but we have so many settings already?).

I also fixed deletes to prune every index.gc_deletes/4 msec, and I
only save a delete tombstone if index.gc_deletes > 0.

I think we could expose the RAM used by versionMap somewhere
(Marvel? _cat?), but we can do that separately ... I put a TODO.

Closes #6378