[
https://issues.apache.org/jira/browse/HBASE-24492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124667#comment-17124667
]
Viraj Jasani edited comment on HBASE-24492 at 6/3/20, 7:09 AM:
---------------------------------------------------------------
[~zhangduo] The issue is not visible at production level. This is a code
improvement I would say. I was going through WAL specific code and stumbled
upon ProtobufLogReader.readNext and realized that while(true) is a confusing
for any reader. If you look at the code closely, there is no loop happening at
all. And I am fine with keeping this in master and branch-2.
was (Author: vjasani):
[~zhangduo] The issue is not visible at production level. This is a code
improvement I would say. I was going through WAL specific code and stumbled
upon ProtobufLogReader.readNext and realized that while(true) is a confusing
for any reader. If you look at the code closely, there is no loop happening at
all. And I am fine with keeping 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)