MartijnVisser commented on code in PR #29647:
URL: https://github.com/apache/flink/pull/29647#discussion_r4401768263
##########
flink-runtime/src/test/java/org/apache/flink/runtime/blob/TestingBlobHelpers.java:
##########
@@ -207,6 +207,41 @@ public static void checkFileCountForApplication(
applicationDir =
cache.getStorageLocation(applicationId, new
PermanentBlobKey()).getParentFile();
}
+ checkFileCountInApplicationDir(expectedCount, applicationDir);
+ }
+
+ /**
+ * Checks the number of files in the blob service for the given
application, like {@link
+ * #checkFileCountForApplication(int, ApplicationID,
PermanentBlobService)}, but without
+ * creating the application directory.
+ *
+ * <p>Use this while a cleanup task may concurrently delete the
application directory: creating
+ * the directory at the same time can fail with a {@link
+ * java.nio.file.FileAlreadyExistsException}.
+ *
+ * @param expectedCount number of expected files in the blob service for
the given application
+ * @param applicationId ID of an application
+ * @param blobService BLOB store to use
+ */
+ public static void checkFileCountForApplicationWithoutCreatingDirectory(
Review Comment:
I think it's simpler to change `checkFileCountForApplication` itself to not
create the directory. No caller relies on that: all blob and library cache
tests pass with the change.
--
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]