[ 
https://issues.apache.org/jira/browse/FLUME-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904453#comment-13904453
 ] 

Hari Shreedharan commented on FLUME-2325:
-----------------------------------------

+1. I agree with the logic of the patch though I am not entirely sure that this 
would cause the exception to be thrown since that if(!open) condition in append 
looks redundant. Roll size and roll count based rolls will trigger a close-open 
in the if(shouldRotate) block. I don't really see how isOpen can be false and 
closed be true at the same time in that block. In fact even the closed variable 
looks redundant as we would remove the reference to this bucket writer 
immediately after the close.

Anyway committing this as this is the correct behavior.

[[email protected]] - what do you think about removing the closed 
variables and if(isOpen) ?

> BucketWriter might throw BucketClosedException incorrectly
> ----------------------------------------------------------
>
>                 Key: FLUME-2325
>                 URL: https://issues.apache.org/jira/browse/FLUME-2325
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.4.0
>            Reporter: chenshangan
>            Priority: Minor
>         Attachments: FLUME-2325.patch
>
>
> in the end of BucketWriter#close(boolean callCloseCallback),  variable closed 
> is set to  true, which will cause append() to throw BucketClosedException 
> every time when close() is called event if it is a file-size based roll.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to