[GeoNetwork-devel] Fixes for: GeoNetwork 2.6.x exhausts open files resources over time

Hi,

I made a branch with changes required to fix ‘GeoNetwork 2.6.x exhausts open files resources over time’ on master.

To do this I had to:

  • Port search tests from geocat.ch. I had to change the tests a bit so that they applied correctly to Geonetwork
  • The tests were csw tests so I had to refactor them so they could be ran using both CSW and XmlSearch
  • I made all tests pass because there was differences between csw and XmlSearch
  • Once all tests passed (about 350) I made a changes similar to the change that Simon on the 2.6.1 branch except that it was quite a bit more work because of the multilingual indexing
  • In addition I used NRTManager so that there doesn’t need to be group indexing vs normal indexing. I added a parameter for how often the readers are updated. It is possible to have then refresh each time a reader is obtained but by default they refresh every 5 seconds.
  • For CatalogSearcher (like Simon’s patch) the searcher keeps a token so it can get the same searchers for follow-up queries. I would like to do this for lucene searcher as well but haven’t yet.
    I would appreciate a review feel free to comment on the commit in github:

https://github.com/jesseeichar/core-geonetwork/commit/aa4d10f6a7a0a6aef277e1bdee28b513960d02c0

Jesse