pan3793 commented on code in PR #8712:
URL: https://github.com/apache/hadoop/pull/8712#discussion_r3932026368
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java:
##########
@@ -1279,12 +1279,15 @@ public void
testDFSClientConfigurationLocateFollowingBlock()
@Timeout(value = 120)
public void testLeaseRenewAndDFSOutputStreamDeadLock() throws Exception {
CountDownLatch testLatch = new CountDownLatch(1);
+ DFSClientFaultInjector oldInjector = DFSClientFaultInjector.get();
DFSClientFaultInjector.set(new DFSClientFaultInjector() {
public void delayWhenRenewLeaseTimeout() {
try {
- testLatch.await();
+ // Bounded, so a renewer thread cannot be parked here forever if this
+ // test dies without running its finally block.
Review Comment:
Wording nit. The `finally` block always runs; the problem is that
`out1.close()` never returns, so it is reached too late. Suggest:
```suggestion
// Bounded, so a stalled out1.close() cannot leave the renewer
// holding the LeaseRenewer monitor forever.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]