elasticsearch/elasticsearch — pull request #5039 by jpountz (2014-02-06 14:43:31+00:00)
Title: Fix BytesRef owning issue in string terms aggregations.

The byte[] array that was used to store the term was owned by the BytesRefHash
which is used to compute counts. However, the BytesRefHash is released at some
point and its content may be recycled.

MockPageCacheRecycler has been improved to expose this issue (putting random
content into the arrays upon release).

Number of documents/terms have been increased in RandomTests to make sure page
recycling occurs.

Close #5021