flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] zhijiangW commented on a change in pull request #8242: [FLINK-6227][network] Introduce the PartitionException for downstream task failure
Date Tue, 21 May 2019 14:39:42 GMT
zhijiangW commented on a change in pull request #8242: [FLINK-6227][network] Introduce the
PartitionException for downstream task failure
URL: https://github.com/apache/flink/pull/8242#discussion_r286061517
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/ClientTransportErrorHandlingTest.java
 ##########
 @@ -134,12 +133,10 @@ public Void answer(InvocationOnMock invocation) throws Throwable {
 		}).when(rich[1]).onError(isA(LocalTransportException.class));
 
 		// First request is successful
-		ChannelFuture f = requestClient.requestSubpartition(new ResultPartitionID(), 0, rich[0],
0);
-		assertTrue(f.await().isSuccess());
+		requestClient.requestSubpartition(new ResultPartitionID(), 0, rich[0], 0);
 
 		// Second request is *not* successful
-		f = requestClient.requestSubpartition(new ResultPartitionID(), 0, rich[1], 0);
-		assertFalse(f.await().isSuccess());
 
 Review comment:
   The `rich[1],onError` is actually verified above, then it would call `sync.countDown()`.
Otherwise the test would fail in timeout.
   
   In `PartitionRequestClient#requestSubpartition`, the `delayMs` is 0 then it would not schedule
`tcpChannel.writeAndFlush(request)`. So I thought it wrote the request in the same thread
before. After double checking this, the write is actually done in netty thread, so I would
consider the race conditions here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message