You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/08/21 00:16:00 UTC
[jira] [Commented] (HDFS-17967) Handle InvalidEncryptionKeyException in data-transfer connection setup paths
[ https://issues.apache.org/jira/browse/HDFS-17967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106444#comment-18106444 ]
ASF GitHub Bot commented on HDFS-17967:
---------------------------------------
JHSUYU opened a new pull request, #8698:
URL: https://github.com/apache/hadoop/pull/8698
JIRA: HDFS-17967
## Summary
This is a follow-up of HDFS-17897 and HDFS-17899.
The following data-transfer connection paths still do not handle InvalidEncryptionKeyException:
- DataXceiver.writeBlock() — mirror pipeline connection
- DataXceiver.replaceBlock() — proxy copy connection
- StripedBlockWriter — erasure coding target connection
With data-transfer encryption enabled, block-key rotation or transient RPC failures delaying key propagation can leave DataNodes temporarily out of sync. The SASL handshake
then fails with InvalidEncryptionKeyException.
Fix: Close the failed socket, clear the cached encryption key, and retry once. Retrying is safe because the exception occurs before the downstream writeBlock or copyBlock request is sent. A second failure is propagated.
## Test
- TestDataXceiverEncryptionKey#testWriteBlockRetriesInvalidEncryptionKeyToMirror
- TestDataXceiverEncryptionKey#testReplaceBlockRetriesInvalidEncryptionKeyToProxy
- TestStripedBlockWriterEncryptionKey#testClearEncryptionKeyOnRetry
> Handle InvalidEncryptionKeyException in data-transfer connection setup paths
> -----------------------------------------------------------------------------
>
> Key: HDFS-17967
> URL: https://issues.apache.org/jira/browse/HDFS-17967
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: datanode
> Affects Versions: 3.4.3
> Reporter: ZhenyuLi
> Priority: Major
>
> HDFS-17897 and HDFS-17899 added handling for
> InvalidEncryptionKeyException in several HDFS data-transfer connection paths.
> However, the following paths still do not retry when the cached data encryption
> key is rejected during the SASL handshake:
> * DataXceiver writeBlock mirror pipeline connection
> * DataXceiver replaceBlock proxy copy connection
> * Erasure coding StripedBlockWriter target connection
> In these paths, InvalidEncryptionKeyException is raised during the SASL
> data-transfer handshake, before the downstream writeBlock or copyBlock request
> is sent. Therefore, retrying the connection once is safe because no
> data-transfer operation has been issued yet.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org