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

Shawn Heisey commented on SOLR-8033:
------------------------------------

It looks like that entire if statement can be removed ... but it was likely 
left in place, commented out, on purpose, so that the next time the developer 
needs to figure out a problem in that code, it can be easily re-added for 
testing, and then commented out again.  HDFS support in Solr is a fairly recent 
addition, and tracking down problems is likely not very easy, so code like this 
can be critical for developer sanity.

> useless if branch
> -----------------
>
>                 Key: SOLR-8033
>                 URL: https://issues.apache.org/jira/browse/SOLR-8033
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 5.0, 5.1
>            Reporter: songwanging
>            Priority: Minor
>
> In method HdfsTransactionLog() of class HdfsTransactionLog 
> (solr\core\src\java\org\apache\solr\update\HdfsTransactionLog.java)
> The if branch presented in the following code snippet performs no actions, we 
> should add more code to handle this or directly delete this if branch.
> HdfsTransactionLog(FileSystem fs, Path tlogFile, Collection<String> 
> globalStrings, boolean openExisting) {
>   ...
>     try {
>       if (debug) {
>         //log.debug("New TransactionLog file=" + tlogFile + ", exists=" + 
> tlogFile.exists() + ", size=" + tlogFile.length() + ", openExisting=" + 
> openExisting);
>       }
> ...
> }



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to