storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [3/4] storm git commit: STORM-3127: Refactor AsyncLocalizer to avoid potential race condition
Date Mon, 09 Jul 2018 21:12:38 GMT
STORM-3127: Refactor AsyncLocalizer to avoid potential race condition

(cherry picked from commit 706029a)


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/11383c2a
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/11383c2a
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/11383c2a

Branch: refs/heads/master
Commit: 11383c2ae08bbadb10857bf0a9dd1eb69b7d2ccc
Parents: 216ed73
Author: Zhengdai Hu <hu.zhengdai@gmail.com>
Authored: Tue Jun 26 09:58:57 2018 -0500
Committer: Zhengdai Hu <hu.zhengdai@gmail.com>
Committed: Fri Jul 6 16:52:20 2018 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/storm/localizer/AsyncLocalizer.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/11383c2a/storm-server/src/main/java/org/apache/storm/localizer/AsyncLocalizer.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/localizer/AsyncLocalizer.java b/storm-server/src/main/java/org/apache/storm/localizer/AsyncLocalizer.java
index 9d91aa0..19a8cd3 100644
--- a/storm-server/src/main/java/org/apache/storm/localizer/AsyncLocalizer.java
+++ b/storm-server/src/main/java/org/apache/storm/localizer/AsyncLocalizer.java
@@ -531,9 +531,9 @@ public class AsyncLocalizer implements AutoCloseable {
                 // go off to blobstore and get it
                 // assume dir passed in exists and has correct permission
                 LOG.debug("fetching blob: {}", key);
+                lrsrc.addReference(pna, localResource.needsCallback() ? cb : null);
                 futures.add(downloadOrUpdate(lrsrc));
                 results.add(lrsrc);
-                lrsrc.addReference(pna, localResource.needsCallback() ? cb : null);
             }
 
             for (CompletableFuture<?> futureRsrc : futures) {


Mime
View raw message