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

jaikiran pai commented on KAFKA-1853:
-------------------------------------

Hi Jay,

Thank you explaining the reasoning behind the async delete (new to Kafka, so 
this kind of comments definitely help). Sorry about the delayed response - I do 
this either during holidays or a weekend. 

{quote}
1. What was the underlying cause of the rename failure, did we ever figure that 
out? Is there any way to make the error more intelligible (we are pretty 
hampered by the terrible java api here).
{quote}
I didn't dig deeper into the reason for a rename failure in that mailing list 
since I thought it would be better to handle the leak case irrespective of how 
the rename fails. As you note, the Java API isn't really helpful here, because 
it gives no indication why the rename might have failed.

{quote}
If rename does fail how should we handle it? Leaking the file is definitely 
wrong. I think the right thing to do is likely just to do an immediate delete. 
This may give errors to fetch requests in progress but they will retry.
{quote}
Given my lack of knowledge about the code and the architecture in general, I 
have a few more questions :) 

1) When I looked at the code, I got the impression that the async deletion 
happens for "expired" log segments. Do expired log segments have active reads 
in progress? What qualifies the log segment as expired?
2) When you say "fetch requests", are those the same as (possibly in progress) 
"read requests"? If they are different are they handled differently in terms of 
retries? Or are both types of requests retried on failures?

(I'm guessing some of these questions are probably answered in the 
documentation, so I'm going to look at that too).


> Unsuccessful suffix rename of expired LogSegment can leak open files and also 
> leave the LogSegment in an invalid state
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-1853
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1853
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8.1.1
>            Reporter: jaikiran pai
>             Fix For: 0.8.3
>
>
> As noted in this discussion in the user mailing list 
> http://mail-archives.apache.org/mod_mbox/kafka-users/201501.mbox/%3C54AE3661.8080007%40gmail.com%3E
>  an unsuccessful attempt at renaming the underlying files of a LogSegment can 
> lead to file leaks and also leave the LogSegment in an invalid state.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to