maqingxiang closed 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
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/serialization/SpillingAdaptiveSpanningRecordDeserializer.java b/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/serialization/SpillingAdaptiveSpanningRecordDeserializer.java index a78cb4dd708..5f959a8e1df 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/serialization/SpillingAdaptiveSpanningRecordDeserializer.java +++ b/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++) { String directory = tempDirs[rnd.nextInt(tempDirs.length)]; spillFile = new File(directory, randomString(rnd) + ".inputchannel"); if (spillFile.createNewFile()) { ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services