Importer DataStore connection error when running multiple tasks

Description

Trying to run parallel ingestions with GeoServer Importer against the same PostGIS DataStore, leads suddenly to the following exception

{{java.lang.IllegalStateException: DataSource not available after calling dispose() or before being set.
at org.geotools.jdbc.JDBCDataStore.getDataSource(JDBCDataStore.java:508)
at org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:2170)
at org.geotools.jdbc.JDBCDataStore.createTypeNames(JDBCDataStore.java:978)
at org.geotools.data.store.ContentDataStore.entry(ContentDataStore.java:497)
at org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:530)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:331)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:303)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:97)
at org.geoserver.importer.Importer.copyFromFeatureSource(Importer.java:1434)
at org.geoserver.importer.Importer.loadIntoDataStore(Importer.java:1355)
at org.geoserver.importer.Importer.doIndirectImport(Importer.java:1104)
at org.geoserver.importer.Importer.run(Importer.java:927)
at org.geoserver.importer.Importer.run(Importer.java:890)
at org.geoserver.importer.Importer$5.callInternal(Importer.java:961)
at org.geoserver.importer.Importer$5.callInternal(Importer.java:954)
at org.geoserver.importer.Importer$SecurityContextCopyingJob.call(Importer.java:992)
at org.geoserver.importer.job.Job.call(Job.java:16)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)}}

Environment

None

Status

Assignee

Unassigned

Reporter

Alessio Fabiani

Triage

None

Fix versions

None

Affects versions

None

Components

Priority

High