You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Stephen Yuan Jiang (JIRA)" <ji...@apache.org> on 2016/12/15 20:02:59 UTC
[jira] [Comment Edited] (HBASE-17149) Procedure v2 - Fix nonce
submission
[ https://issues.apache.org/jira/browse/HBASE-17149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15752365#comment-15752365 ]
Stephen Yuan Jiang edited comment on HBASE-17149 at 12/15/16 8:02 PM:
----------------------------------------------------------------------
The UT failure is unrelated to this change.
The javadoc warning (basically, in the comments,@Override appears) - we can either ignore or make the comment simpler.
I am not quite understand the FindBugs warning by looking at the code (maybe it complains that the 'completed' map is 100% sure that the key is missing when reaching to line 745):
{code}
public void setFailureResultForNonce(final NonceKey nonceKey, final String procName,
final User procOwner, final IOException exception) {
if (nonceKey == null) return;
final Long procId = nonceKeysToProcIdsMap.get(nonceKey);
if (procId == null || completed.containsKey(procId)) return;
final long currentTime = EnvironmentEdgeManager.currentTime();
final ProcedureInfo result = new ProcedureInfo(procId.longValue(),
procName, procOwner != null ? procOwner.getShortName() : null,
ProcedureUtil.convertToProcedureState(ProcedureState.ROLLEDBACK),
-1, nonceKey, exception, currentTime, currentTime, null);
completed.putIfAbsent(procId.longValue(), result); <== Line 745
}
{code}
[~stack], any insight? If you don't see issue either, then we can commit.
was (Author: syuanjiang):
The UT failure is unrelated to this change.
The javadoc warning (basically, in the comments,@Override appears) - we can either ignore or make the comment simpler.
I am not quite understand the FindBugs warning by looking at the code (maybe it complains that the 'completed' map is 100% sure that the key is missing when reaching to line 745):
{code}
public void setFailureResultForNonce(final NonceKey nonceKey, final String procName,
final User procOwner, final IOException exception) {
if (nonceKey == null) return;
final Long procId = nonceKeysToProcIdsMap.get(nonceKey);
if (procId == null || completed.containsKey(procId)) return;
final long currentTime = EnvironmentEdgeManager.currentTime();
final ProcedureInfo result = new ProcedureInfo(procId.longValue(),
procName, procOwner != null ? procOwner.getShortName() : null,
ProcedureUtil.convertToProcedureState(ProcedureState.ROLLEDBACK),
-1, nonceKey, exception, currentTime, currentTime, null);
completed.putIfAbsent(procId.longValue(), result); <== Line 745
}
{code}
> Procedure v2 - Fix nonce submission
> -----------------------------------
>
> Key: HBASE-17149
> URL: https://issues.apache.org/jira/browse/HBASE-17149
> Project: HBase
> Issue Type: Sub-task
> Components: proc-v2
> Affects Versions: 2.0.0, 1.3.0, 1.4.0, 1.1.7, 1.2.4
> Reporter: Matteo Bertozzi
> Assignee: Matteo Bertozzi
> Attachments: nonce.patch
>
>
> instead of having all the logic in submitProcedure(), split in registerNonce() + submitProcedure().
> In this case we can avoid calling the coprocessor twice and having a clean submit logic knowing that there will only be one submission.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)