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

Duo Zhang commented on HBASE-21250:
-----------------------------------

I have to say that it is really difficult to understand...

And it seems that there is a bug? In the resetTo method of 
ProcedureStoreTracker, we do not clear the old BitSetNode map before adding the 
new ones, while in resetToProto we call reset first to clear the old map. But 
in resetToProto we do not update the minProcId and maxProcId, it maybe OK as 
this will only be called when restarting and seems we will use another data 
structure to calculate the minProcId and maxProcId, but there is no comment to 
say this...

> Refactor WALProcedureStore and add more comments for better understanding the 
> implementation
> --------------------------------------------------------------------------------------------
>
>                 Key: HBASE-21250
>                 URL: https://issues.apache.org/jira/browse/HBASE-21250
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Duo Zhang
>            Priority: Major
>             Fix For: 3.0.0, 2.2.0
>
>
> The implementation is complicated and lack of comments to say how it works.
> {code}
> /**
>  * WAL implementation of the ProcedureStore.
>  * @see ProcedureWALPrettyPrinter for printing content of a single WAL.
>  * @see #main(String[]) to parse a directory of MasterWALProcs.
>  */
> {code}
> I think at least we can move sub classes to separated files to make the class 
> smaller, and add more comments to describe what is going on here.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to