Importer concurrent jobs are not limited

Description

I'm using the GeoServer importer and I noticed I can start as many sessions I want without receiving an error. Some of the sessions will simply go back to a "ready" state without having effect.

After a little digging I foung this class: https://github.com/geoserver/geoserver/blob/master/src/extension/importer/core/src/main/java/org/geoserver/importer/job/JobQueue.java

If I understand it correctly, the queue it's not actually queuing anything, it's a direct hand-off, so the jobs will be executed immediately until the thread pool reaches its maximum size.
And since the maximum pool size is Integer.MAX_VALUE I guess I should not start too many sessions at once.

There should be a way to configure the maximum concurrent jobs.

Environment

None

Assignee

Andrea Aime

Reporter

Gnafu

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure