[
https://issues.apache.org/jira/browse/HBASE-18961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201195#comment-16201195
]
Appy edited comment on HBASE-18961 at 10/12/17 5:23 PM:
--------------------------------------------------------
Posting improvement suggestions from HBASE-18960 here since we don't want to
block that and keep things moving:
- This is used so often. Probably add a function
{{batchOp.isOperationPending(i)}} for it.
{noformat}
if (batchOp.retCodeDetails[lastIndexExclusive].getOperationStatusCode() !=
OperationStatusCode.NOT_RUN) {
{noformat}
- "writeEntry" only seems to be used for non-reply case. Can we rename it to
make it explicit? And return null from doWALAppend when it's replay mode?
- In all earlier cases of doWALAppend(), WALEdit was checked to be non-empty.
Make keep that invariant (and even add precondition check for it in the
function). Seeing {{if (walEdit.isEmpty()}} in the function, it made me search
everywhere what if it was empty.
- move writeRequestsCount to doMiniBatchMutation. Right now, if the operation
actually fails with exception, we are still incrementing that counter.
- In batchMutate(), can we move initialization section out of while(isDone())
loop.
Edit:
- Update javadoc of preBatchMutate on change of return code semantics in
previous jira.
was (Author: appy):
Posting improvement suggestions from HBASE-18960 here since we don't want to
block that and keep things moving:
- This is used so often. Probably add a function
{{batchOp.isOperationPending(i)}} for it.
{noformat}
if (batchOp.retCodeDetails[lastIndexExclusive].getOperationStatusCode() !=
OperationStatusCode.NOT_RUN) {
{noformat}
- "writeEntry" only seems to be used for non-reply case. Can we rename it to
make it explicit? And return null from doWALAppend when it's replay mode?
- In all earlier cases of doWALAppend(), WALEdit was checked to be non-empty.
Make keep that invariant (and even add precondition check for it in the
function). Seeing {{if (walEdit.isEmpty()}} in the function, it made me search
everywhere what if it was empty.
- move writeRequestsCount to doMiniBatchMutation. Right now, if the operation
actually fails with exception, we are still incrementing that counter.
- In batchMutate(), can we move initialization section out of while(isDone())
loop.
> doMiniBatchMutate() is big, split it into smaller methods
> ---------------------------------------------------------
>
> Key: HBASE-18961
> URL: https://issues.apache.org/jira/browse/HBASE-18961
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver
> Affects Versions: 2.0.0-alpha-3
> Reporter: Umesh Agashe
> Assignee: Umesh Agashe
> Fix For: 2.0.0-alpha-4
>
>
> Split doMiniBatchMutate() and improve readability.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)