Opened 13 years ago

Closed 13 years ago

#566 closed defect (fixed)

Use ScheduledExecutorService instead of Timer for index metadata tasks

Reported by: jesseeichar Owned by: geonetwork-devel@…
Priority: major Milestone: v2.6.5
Component: General Version: v2.6.3
Keywords: Cc:

Description

Right now when a metadata needs to be indexed asynchonously a new Timer object and IndexMetadataTask are created. This has the potential to blow up into hundreds of Timer objects when doing a full re-index.

The ScheduledThreadExecutor allows the number of threads to be controlled through configuration.

I have a patch that makes the change and the number of threads are configured in the config.xml file. The default is 4 threads. Each thread has the name "Index Task Thread" and normal thread priority. Thread priority can also be configured in config.xml.

Attachments (1)

566-ThreadPoolExecutor-for-indexing.patch (5.8 KB ) - added by jesseeichar 13 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 by jesseeichar, 13 years ago

Resolution: fixed
Status: newclosed

A thread pool was introduced which fixes the issue

Note: See TracTickets for help on using tickets.