You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by revans2 <gi...@git.apache.org> on 2018/09/19 17:48:22 UTC

[GitHub] storm pull request #2843: STORM-3230: Add in sync if key not found

GitHub user revans2 opened a pull request:

    https://github.com/apache/storm/pull/2843

    STORM-3230: Add in sync if key not found

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/revans2/incubator-storm STORM-3230

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/2843.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2843
    
----
commit 839071367754338b83096e9d1f908f859e9d5493
Author: Robert (Bobby) Evans <ev...@...>
Date:   2018-09-19T15:05:23Z

    STORM-3230: Add in sync if key not found

----


---

[GitHub] storm pull request #2843: STORM-3230: Add in sync if key not found

Posted by agresch <gi...@git.apache.org>.
Github user agresch commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2843#discussion_r218902320
  
    --- Diff: storm-client/src/jvm/org/apache/storm/cluster/StormClusterStateImpl.java ---
    @@ -903,6 +911,7 @@ public void removeAllPrivateWorkerKeys(String topologyId) {
             for (WorkerTokenServiceType type : WorkerTokenServiceType.values()) {
                 String path = ClusterUtils.secretKeysPath(type, topologyId);
                 try {
    +                LOG.debug("Removing worker keys under {}", path);
    --- End diff --
    
    If this does not hit often, I would vote for making this info.


---

[GitHub] storm pull request #2843: STORM-3230: Add in sync if key not found

Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2843#discussion_r218922619
  
    --- Diff: storm-client/src/jvm/org/apache/storm/security/auth/workertoken/WorkerTokenAuthorizer.java ---
    @@ -95,9 +95,12 @@ private static IStormClusterState buildStateIfNeeded(Map<String, Object> conf, T
                 throw new IllegalArgumentException("Token is not valid, token has expired.");
             }
     
    -        PrivateWorkerKey key = keyCache.getUnchecked(deser);
    -        if (key == null) {
    -            throw new IllegalArgumentException("Token is not valid, private key not found.");
    +        PrivateWorkerKey key;
    +        try {
    +            key = keyCache.getUnchecked(deser);
    +        } catch (CacheLoader.InvalidCacheLoadException e) {
    +            //This happens when the cache has a null returned to it.
    --- End diff --
    
    I'll update the comment.


---

[GitHub] storm pull request #2843: STORM-3230: Add in sync if key not found

Posted by Ethanlm <gi...@git.apache.org>.
Github user Ethanlm commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2843#discussion_r218905963
  
    --- Diff: storm-client/src/jvm/org/apache/storm/security/auth/workertoken/WorkerTokenAuthorizer.java ---
    @@ -95,9 +95,12 @@ private static IStormClusterState buildStateIfNeeded(Map<String, Object> conf, T
                 throw new IllegalArgumentException("Token is not valid, token has expired.");
             }
     
    -        PrivateWorkerKey key = keyCache.getUnchecked(deser);
    -        if (key == null) {
    -            throw new IllegalArgumentException("Token is not valid, private key not found.");
    +        PrivateWorkerKey key;
    +        try {
    +            key = keyCache.getUnchecked(deser);
    +        } catch (CacheLoader.InvalidCacheLoadException e) {
    +            //This happens when the cache has a null returned to it.
    --- End diff --
    
    not sure about this. If `getUnchecked(deser);` returns null, it will throw an exception?


---

[GitHub] storm pull request #2843: STORM-3230: Add in sync if key not found

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/2843


---