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 2023/09/14 06:48:00 UTC
[jira] [Commented] (HDFS-17190) EC: Fix bug of OIV processing XAttr.
[ https://issues.apache.org/jira/browse/HDFS-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765022#comment-17765022 ]
ASF GitHub Bot commented on HDFS-17190:
---------------------------------------
zhangshuyan0 opened a new pull request, #6067:
URL: https://github.com/apache/hadoop/pull/6067
### Description of PR
When we need to use OIV to print EC information for a directory, `PBImageTextWriter#getErasureCodingPolicyName` will be called. Currently, this method uses `XATTR_ERASURECODING_POLICY.contains(xattr.getName())` to filter and obtain EC XAttr, which is very dangerous. If we have a XAttr whose name happens to be a substring of `hdfs.erasurecoding.policy`, then `getErasureCodingPolicyName` will return the wrong result. Our internal production environment has customized some XAttrs, and this bug caused errors in the parsing results of OIV when using `-ec` option.
### How was this patch tested?
Add a new UT.
> EC: Fix bug of OIV processing XAttr.
> ------------------------------------
>
> Key: HDFS-17190
> URL: https://issues.apache.org/jira/browse/HDFS-17190
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Shuyan Zhang
> Priority: Major
>
> When we need to use OIV to print EC information for a directory, `PBImageTextWriter#getErasureCodingPolicyName` will be called. Currently, this method uses `XATTR_ERASURECODING_POLICY.contains(xattr.getName())` to filter and obtain EC XAttr, which is very dangerous. If we have an XAttr whose name happens to be a substring of `hdfs.erasurecoding.policy`, then `getErasureCodingPolicyName` will return the wrong result. Our internal production environment has customized some XAttrs, and this bug caused errors in the parsing results of OIV when using `-ec` option.
--
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