You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Cédric Damioli (JIRA)" <ji...@apache.org> on 2012/11/22 23:38:58 UTC
[jira] [Closed] (COCOON-2307) When interrupted, the ResourceReader
may store incomplete data in the cache
[ https://issues.apache.org/jira/browse/COCOON-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cédric Damioli closed COCOON-2307.
----------------------------------
Resolution: Fixed
Committed in revision 1412695
> When interrupted, the ResourceReader may store incomplete data in the cache
> ---------------------------------------------------------------------------
>
> Key: COCOON-2307
> URL: https://issues.apache.org/jira/browse/COCOON-2307
> Project: Cocoon
> Issue Type: Bug
> Components: * Cocoon Core
> Affects Versions: 2.1.11
> Reporter: Cédric Damioli
> Fix For: 2.1.12-dev (Current SVN)
>
> Attachments: ResourceReader.java.patch
>
>
> the code of the generate() method of the ResourceReader is basically :
> {code}
> public void generate() throws IOException, ProcessingException {
> try {
> // process stream
> } catch (IOException e) {
> getLogger().debug("Received an IOException, assuming client severed connection on purpose");
> }
> {code}
> the code of the processReader() method in AbstractCachingProcessingPipeline is basically :
> {code}
> protected boolean processReader(Environment environment){
> try {
> ...
> reader.generate();
> cache.store(pcKey, res);
> ...
> } catch (Exception e) {
> handleException(e);
> }
> {code}
> If the client abort the connection, a SocketException (eventually wrapped by Tomcat in a ClientAbortException) is thrown, catched in the ResourceReader and not rethrown. The method finish normally and truncated data is then stored in the cache.
> Next requests lookup the cache and return truncated data.
> I suggest to simply rethrow the IOException in the catch block, so that the exception handling mechanism of the AbstractCachingProcessingPipeline may be executed
> WDYT ?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira