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

Viraj Jasani edited comment on HBASE-24492 at 6/3/20, 6:17 AM:
---------------------------------------------------------------

[~stack] sure I am definitely fine with restricting this till branch-2.

 

Moreover, the major reason behind removal of while is: The method is single 
pass execution. I was going through WAL split code and reached here and 
realized this while loop seems confusing to readers, and it's not looping at 
all. Tried some tests locally to confirm. But most importantly, if we look at 
the entire method, the code is surrounded by mostly try/cache and some if/else, 
for each branching, either we are returning boolean value or we are throwing 
Exception. I could not find a single point from where we are looping.


was (Author: vjasani):
[~stack] sure I am definitely fine with restricting this till branch-2.

> ProtobufLogReader.readNext does not need looping
> ------------------------------------------------
>
>                 Key: HBASE-24492
>                 URL: https://issues.apache.org/jira/browse/HBASE-24492
>             Project: HBase
>          Issue Type: Task
>            Reporter: Viraj Jasani
>            Assignee: Viraj Jasani
>            Priority: Minor
>             Fix For: 3.0.0-alpha-1, 2.4.0
>
>
> ProtobufLogReader.readNext is using infinite while loop for the whole method, 
> however it returns value or throws errors in single execution. while(true) 
> was part of initial code and with better improvements in the method, this 
> loop has not been removed yet.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to