cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Damioli (JIRA) <j...@apache.org>
Subject [jira] [Updated] (COCOON-2307) When interrupted, the ResourceReader may store incomplete data in the cache
Date Thu, 22 Nov 2012 22:34:58 GMT

     [ https://issues.apache.org/jira/browse/COCOON-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Cédric Damioli updated COCOON-2307:
-----------------------------------

    Fix Version/s: 2.1.12-dev (Current SVN)
    
> 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

Mime
View raw message