FileSystemWatcher: 100% CPU usage while idle running on a large data directory

Description

Running against a large data directory (my test one currently having 100 workspaces and 89k shapefile stores/layers) leads to a constant 100% usage on one CPU core (which one varies every a handful of seconds).

Inspecting with jvisualvm reveals the FileSystemWatcher-1 thread is constantly busy, even with https://github.com/geoserver/geoserver/pull/3451 applied which returns the number of watched resources to a minimum.

Environment

None

Assignee

Gabriel Roldan

Reporter

Gabriel Roldan

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure