[
https://issues.apache.org/jira/browse/HDFS-16961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18032633#comment-18032633
]
ASF GitHub Bot commented on HDFS-16961:
---------------------------------------
github-actions[bot] closed pull request #5500: HDFS-16961. The blockReport RPC
should throw UnregisteredNodeException when the storedDN is null
URL: https://github.com/apache/hadoop/pull/5500
> The blockReport RPC should throw UnregisteredNodeException when the storedDN
> is null
> ------------------------------------------------------------------------------------
>
> Key: HDFS-16961
> URL: https://issues.apache.org/jira/browse/HDFS-16961
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: ZanderXu
> Assignee: ZanderXu
> Priority: Major
> Labels: pull-request-available
>
> The blockReport RPC should throw UnregisteredNodeException when the storedDN
> is null, and the related code as bellows:
> {code:java}
> public void removeBRLeaseIfNeeded(final DatanodeID nodeID,
> final BlockReportContext context) throws IOException {
> namesystem.writeLock(OperationName.REMOVE_BR_LEASE_IF_NEEDED);
> DatanodeDescriptor node;
> try {
> // Here, if the node is null, should throw UnregisteredNodeException
> instand of NPE
> node = datanodeManager.getDatanode(nodeID);
> if (context != null) {
> if (context.getTotalRpcs() == context.getCurRpc() + 1) {
> long leaseId = this.getBlockReportLeaseManager().removeLease(node);
> BlockManagerFaultInjector.getInstance().
> removeBlockReportLease(node, leaseId);
> node.setLastBlockReportTime(now());
> node.setLastBlockReportMonotonic(Time.monotonicNow());
> }
> LOG.debug("Processing RPC with index {} out of total {} RPCs in "
> + "processReport 0x{}", context.getCurRpc(),
> context.getTotalRpcs(), Long.toHexString(context.getReportId()));
> }
> } finally {
> namesystem.writeUnlock(OperationName.REMOVE_BR_LEASE_IF_NEEDED);
> }
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]