-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-17706. TestBlockTokenWithDFSStriped fails due to closed streams #7275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🎊 +1 overall
This message was automatically generated. |
@@ -582,6 +582,9 @@ protected void doTestRead(Configuration conf, MiniDFSCluster cluster, | |||
|
|||
// restart the namenode to allow DFSClient to re-fetch tokens | |||
cluster.restartNameNode(0); | |||
// Reopen closed streams | |||
in1 = fs.open(fileToRead); | |||
in3 = fs.open(fileToRead); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your works here. Not familiar with this unit test, just confused where are this input stream closed? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review. The exceptions happen in the 2 assertFalse(checkFile())
lines right above and the streams were closed during exception handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, try to explore the code but not see any explicit close stream operation, anything I skipped? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hexiaoqiao Sir, inputStream is closed here: https://github.com/harris233/hadoop/blob/e73f432f56ca8c209cff0a7f3077522b5e76e0d7/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripeReader.java#L356C7-L356C28
This code was introduced by HDFS-17080


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. +1.
Committed to trunk. Thanks @kokon191 ! |
@kokon191 Would you mind to check if we could cherry-pick to branch-3.4 smoothly or need to prepare another PR for branch-3.4? |
@Hexiaoqiao The commit can be cherry picked straight to branch-3.4 without any conflict |
Great, check-pick to branch-3.4. |
No description provided.