Opened 12 years ago

Closed 12 years ago

#1073 closed defect (fixed)

CatalogSearcher closes index readers while they are still in use.

Reported by: jeichar Owned by: geonetwork-devel@…
Priority: major Milestone: v2.10.0 RC0
Component: General Version: v2.8.0RC0
Keywords: Cc:

Description

I set up a jmeter test suite to stress test Geonetwork a little and I have found some severe issues with the CSW support. I will try to explain the issue:

User 1 makes CSW request Catalog Searcher (using LuceneSearcher) begins processing request

User 2 makes CSW a different request Catalog Searcher closes Index reader for last request and opens new reader

LuceneSearcher explodes because its index reader has been closed.

I think it is pretty clear what the problem is here but the solution is not as simple we cannot leave requests open.

I propose making CatalogSearcher not cache index reader but instead open each time it is needed.

CatalogSearcher will be stored on the UserSession so that the user is able to select metadata using the searcher.

This simplifies the reader handling and reduces chances of resource leaks in the CatalogSearcher.

See the patch at:

https://github.com/jesseeichar/core-geonetwork/compare/master...bug;csw_getrecords_parallelism

Change History (1)

comment:1 by jeichar, 12 years ago

Resolution: fixed
Status: newclosed

fix applied. commit id is: 0b7e345139ad5923f4a9006cd9ea8c67ae3314ba

Note: See TracTickets for help on using tickets.