flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NicoK <...@git.apache.org>
Subject [GitHub] flink pull request #4146: [FLINK-6008][blob] collection of BlobServer improv...
Date Thu, 29 Jun 2017 08:01:21 GMT
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4146#discussion_r124734798
  
    --- 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 --
    
    Unfortunately, concurrency with `delete` operations does not work either if not guarded
- the directory may not exist anymore between `jobDirectory.mkdirs()` and `jobDirectory.exists()`.
I was able to reproduce the error with the existing test though - if you want to try it, just
change the order of these two commands back - the test will not hit every time, but some times.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message