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 "Ayush Saxena (Jira)" <ji...@apache.org> on 2023/05/10 11:06:00 UTC

[jira] [Commented] (HDFS-17000) Potential infinite loop in TestDFSStripedOutputStreamUpdatePipeline.testDFSStripedOutputStreamUpdatePipeline

    [ https://issues.apache.org/jira/browse/HDFS-17000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17721297#comment-17721297 ] 

Ayush Saxena commented on HDFS-17000:
-------------------------------------

yep, we should change int i to long.

Though technically it won't ever go that far, the code with go into the catch block post 1024 * 1024 * 5, but makes sense to change to long.

[~Marcono1234] can you raise a PR to change to long. Let me know if you face any issues. can try help

> Potential infinite loop in TestDFSStripedOutputStreamUpdatePipeline.testDFSStripedOutputStreamUpdatePipeline
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-17000
>                 URL: https://issues.apache.org/jira/browse/HDFS-17000
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Marcono1234
>            Priority: Major
>
> The method {{TestDFSStripedOutputStreamUpdatePipeline.testDFSStripedOutputStreamUpdatePipeline}} contains the following line:
> {code}
> for (int i = 0; i < Long.MAX_VALUE; i++) {
> {code}
> [GitHub source link|https://github.com/apache/hadoop/blob/4ee92efb73a90ae7f909e96de242d216ad6878b2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedOutputStreamUpdatePipeline.java#L48]
> Because {{i}} is an {{int}} the condition {{i < Long.MAX_VALUE}} will always be true and {{i}} will simply overflow.



--
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