[
https://issues.apache.org/jira/browse/KAFKA-3762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15319485#comment-15319485
]
ASF GitHub Bot commented on KAFKA-3762:
---------------------------------------
GitHub user imandhan opened a pull request:
https://github.com/apache/kafka/pull/1480
KAFKA-3762 Log.loadSegments() should log the message in exception
Adding an error logging message in Log.loadSegments() in the case when an
index file corresponding to a log file exists but an exception is thrown.
Signed-off-by: Ishita Mandhan <[email protected]>
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/imandhan/kafka KAFKA-3762
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1480.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1480
----
commit 7d4246efabdc482fab126697ff0457dda0f785ba
Author: Ishita Mandhan <[email protected]>
Date: 2016-06-07T21:34:41Z
KAFKA-3762 Log.loadSegments() should log the message in exception
Adding an error logging message in Log.loadSegments() in the case when an
index file corresponding to a log file exists but an exception is thrown.
Signed-off-by: Ishita Mandhan <[email protected]>
----
> Log.loadSegments() should log the message in exception
> ------------------------------------------------------
>
> Key: KAFKA-3762
> URL: https://issues.apache.org/jira/browse/KAFKA-3762
> Project: Kafka
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.10.0.0
> Reporter: Jun Rao
> Assignee: Ishita Mandhan
> Labels: newbie
>
> In Log.loadSegments(), we have the following code. It would be useful to log
> the error message in IllegalArgumentException.
> if(indexFile.exists()) {
> try {
> segment.index.sanityCheck()
> } catch {
> case e: java.lang.IllegalArgumentException =>
> warn("Found a corrupted index file, %s, deleting and rebuilding
> index...".format(indexFile.getAbsolutePath))
> indexFile.delete()
> segment.recover(config.maxMessageSize)
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)