Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/4146#discussion_r124586418
--- Diff:
flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java
---
@@ -59,6 +60,110 @@
private final Random rnd = new Random();
+
+ // --- concurrency tests for utility methods which could fail during
the put operation ---
+
+ /**
+ * Checked thread that calls {@link
BlobServer#getStorageLocation(BlobKey)}
+ */
+ public static class ContentAddressableGetStorageLocation extends
CheckedThread {
+ private final BlobServer server;
+ private final BlobKey key;
+
+ public ContentAddressableGetStorageLocation(BlobServer server,
BlobKey key) {
+ this.server = server;
+ this.key = key;
+ }
+
+ @Override
+ public void go() throws Exception {
+ server.getStorageLocation(key);
--- End diff --
Actually, the job directory is only created once so it doesn't help adding
more calls. What could help make this happen more often, is to add more threads
to
`BlobServerPutTest#testServerContentAddressableGetStorageLocationConcurrent()`
otherwise the failure only happens once in a while if the implementation is not
thread-safe
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---