[
https://issues.apache.org/jira/browse/HDFS-13313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18047955#comment-18047955
]
ASF GitHub Bot commented on HDFS-13313:
---------------------------------------
github-actions[bot] commented on PR #355:
URL: https://github.com/apache/hadoop/pull/355#issuecomment-3695176448
We're closing this stale PR because it has been open for 100 days with no
activity. This isn't a judgement on the merit of the PR in any way. It's just a
way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working
on it, please feel free to re-open it and ask for a committer to remove the
stale tag and review again.
Thanks all for your contribution.
> FSEditLogOp.toString() throws NullPointerException
> --------------------------------------------------
>
> Key: HDFS-13313
> URL: https://issues.apache.org/jira/browse/HDFS-13313
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.0.2
> Reporter: Tianyi Wang
> Priority: Minor
>
> In some subclasses of FSEditLogOp, toString() [uses dot (.) operator on some
> could-be-null
> fields|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java#L3896].
> Those fields could be set to null by
> [resetSubFields()|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java#L3857].
> This error can be hit by turning on debug logging: toString() is called in
> [FSEditLogAsync.logSync()|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogAsync.java#L128]
> with debug logging and reset() is called in
> [doEditTransaction()|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java#L484]
> when the operation is executed asynchronously.
> Proposed change: Avoid "field of field" access in toString() and use
> StringBuilder.append(field) because those fields have toString() themselves,
> and it would append "null" to the string if 'field' is null.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]