[Geoserver-devel] [jira] Created: (GEOS-630) Possible race condition with cascading WFS data store

Possible race condition with cascading WFS data store
-----------------------------------------------------

         Key: GEOS-630
         URL: http://jira.codehaus.org/browse/GEOS-630
     Project: GeoServer
        Type: Improvement

  Components: WFS
    Versions: 1.3.1
Environment: OS X, Java 1.5
    Reporter: Ryan Hofschneider
Assigned to: dblasby
    Priority: Minor

While fulfilling a request that requires a call out to a second WFS, GeoServer executes over two threads. The "main" thread, which responds to the original request, launches a second thread (WFSFeatureReader extends FCBuffer). Roughly, WFSFeatureReader is used to connect to the second WFS, forward the query and populate a fixed-size queue (via FCBuffer.addFeature) as results come in. Simultaneously, the "main" thread reads from that queue (via FCBuffer.next), and sends the results to the client.

It looks to me like the classic producer/consumer model, except I don't see anything protecting the critical sections of FCBuffer.next() or FCBuffer.addFeature().

Although I have not been able to cause a bug directly, I believe unexpected behavior can result unless some mutual exclusion is enforced.

--
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