Repository: flink Updated Branches: refs/heads/master cd43dd59e -> 4a8e94403
[FLINK-4485] close classloader in absence of reference holders Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/4a8e9440 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/4a8e9440 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/4a8e9440 Branch: refs/heads/master Commit: 4a8e94403fb48318561a3cf2da57ba9da280949e Parents: cd43dd5 Author: Maximilian Michels <[email protected]> Authored: Fri Sep 23 14:14:09 2016 +0200 Committer: Maximilian Michels <[email protected]> Committed: Sat Sep 24 14:19:09 2016 +0200 ---------------------------------------------------------------------- .../runtime/execution/librarycache/BlobLibraryCacheManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/4a8e9440/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java b/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java index 21c6b4d..c94768d 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java @@ -157,10 +157,12 @@ public final class BlobLibraryCacheManager extends TimerTask implements LibraryC Preconditions.checkNotNull(task, "The task execution id must not be null."); synchronized (lockObject) { - LibraryCacheEntry entry = cacheEntries.remove(jobId); + LibraryCacheEntry entry = cacheEntries.get(jobId); if (entry != null) { if (entry.unregister(task)) { + cacheEntries.remove(jobId); + entry.releaseClassLoader(); for (BlobKey key : entry.getLibraries()) {
