You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/11/13 08:05:22 UTC

[GitHub] zhijiangW commented on a change in pull request #7083: [hotfix][flink-runtime] modify maxAttempts when find a unique file name for the spilling channel

zhijiangW commented on a change in pull request #7083: [hotfix][flink-runtime] modify maxAttempts when find a unique file name for the spilling channel
URL: https://github.com/apache/flink/pull/7083#discussion_r232929174
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/serialization/SpillingAdaptiveSpanningRecordDeserializer.java
 ##########
 @@ -630,8 +630,7 @@ private FileChannel createSpillingChannel() throws IOException {
 			}
 
 			// try to find a unique file name for the spilling channel
-			int maxAttempts = 10;
-			for (int attempt = 0; attempt < maxAttempts; attempt++) {
+			for (int attempt = 0; attempt < tempDirs.length; attempt++) {
 
 Review comment:
   I am not clear what is the motivation for changing this. 
   
   The following file name generation is not only based on `tempDirs.length` which is only for the parent dir, and the specific sub name is from `randomString(rnd)`, so I think it does not very make sense to limit the retry times directly based on `tempDirs.length`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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