Sergey Shelukhin commented on ORC-310:

This now addresses two issues.
First of all, there's issue with clone env; namely codec reference gets shallow 
copied and then cleanup returns the codec to the pool twice.
Then, and this happened in both issues I think - when we were not calling reset 
and here - an invalid codec can be added to the pool on error (doesn't matter 
which error).
So, the code is changed to handle reset failure and discard the codec, and also 
to allow the user to report an error (this is done for convenience to avoid 
every piece of code using the codec having to do 
if-ok-then-return-else-try-close-catch-log-error dance.

> better error handling and lifecycle management for codecs
> ---------------------------------------------------------
>                 Key: ORC-310
>                 URL: https://issues.apache.org/jira/browse/ORC-310
>             Project: ORC
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>            Priority: Major
> When there's a failure potentially involving the codec, the codec object may 
> be left in bad state and should not be reused (esp. given that Hadoop codecs 
> are brittle w.r.t. how they maintain state).
> The codecs can be closed on error instead.

This message was sent by Atlassian JIRA

Reply via email to