helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject [1/2] helix git commit: Fixing an NPE when there is a session mismatch in HelixTaskExecutor
Date Thu, 16 Jun 2016 22:55:18 GMT
Repository: helix
Updated Branches:
  refs/heads/master f011ea3ee -> d32968fbd


Fixing an NPE when there is a session mismatch in HelixTaskExecutor

Signed-off-by: Adam Lugowski <alugowski@turn.com>


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

Branch: refs/heads/master
Commit: a35c63656dd70e6aac2d8067a614bc98896202bd
Parents: 94e1079
Author: Adam Lugowski <alugowski@turn.com>
Authored: Mon Jun 13 18:31:45 2016 -0700
Committer: Adam Lugowski <alugowski@turn.com>
Committed: Mon Jun 13 18:31:45 2016 -0700

----------------------------------------------------------------------
 .../org/apache/helix/messaging/handling/HelixTaskExecutor.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/a35c6365/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java
b/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java
index 8a380c4..9680511 100644
--- a/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java
+++ b/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java
@@ -552,7 +552,8 @@ public class HelixTaskExecutor implements MessageListener, TaskExecutor
{
       SessionId tgtSessionId = message.getTypedTgtSessionId();
 
       // sessionId mismatch normally means message comes from expired session, just remove
it
-      if (!sessionId.equals(tgtSessionId.toString()) && !tgtSessionId.toString().equals("*"))
{
+      if (tgtSessionId == null ||
+		      (!sessionId.equals(tgtSessionId.toString()) && !tgtSessionId.toString().equals("*")))
{
         String warningMessage =
             "SessionId does NOT match. expected sessionId: " + sessionId
                 + ", tgtSessionId in message: " + tgtSessionId + ", messageId: "


Mime
View raw message