GeoServer/Image mosaic jdbc reader not thread safe (blank images)
-----------------------------------------------------------------
Key: GEOS-3216
URL: http://jira.codehaus.org/browse/GEOS-3216
Project: GeoServer
Issue Type: Bug
Components: Image mosaic JDBC
Affects Versions: 1.7.5
Reporter: Arnoud de Bruijn
Assignee: Andrea Aime
Hi everyone!
We''ve been using the ImageMosaicJDBC plug in GeoServer 1.7.5. When requesting
several images at the same time, some of the images come back blank when they
shouldn't. After some debugging I found out the following: GeoServer seems to
use the same ImageMosiacJDBCReader object for processing all (i.e. all except
for the first set of) simultaneous requests. This, in turn, causes
ImageMosaicJDBCReader.loadTiles to pass on private member 'tileQueue' to
threads processing different requests. In some cases this leads to an end
marker being written in the tile queue and an ImageComposer-thread exiting
without having processed any queue objects (it's decoder threads are presumably
still busy), the 'image' variable is null and is reset to the
ImageMosaicJDBCReader.DEFAULT_IMAGE_TYPE.
The question is: what is the contract between GeoServer and its plugins? i.e.
should the plugin be thread safe or should GeoServer deal with thread safe
issues? I've looked into resourcepool.java.getgridcoveragerea...@520 : the
coverage reader is cached per CoverageStoreInfo and is being reused for every
incoming request (except for when no reader has been previously cached: the
synchronize only guards the 'put' and not the 'get' so in that case the threads
are waiting in line to create and cache a reader), so this would suggest the
plugin should be thread safe. I've temporarily disabled coverage reader caching
because we need it to work for a demo :)
Does anyone have any thoughts on the matter?
Cheers,
Arnoud de Bruijn
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel