You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gw...@apache.org on 2016/02/04 08:48:21 UTC

kafka git commit: KAFKA-3198: Ticket Renewal Thread exits prematurely due to inverted c…

Repository: kafka
Updated Branches:
  refs/heads/trunk d3ff902d6 -> 99956f56c


KAFKA-3198: Ticket Renewal Thread exits prematurely due to inverted c…

KAFKA-3198: Ticket Renewal Thread exits prematurely due to inverted comparison

The >= should be < since we are actually able to renew if the renewTill time is later than the current ticket expiration.

Author: Adam Kunicki <ad...@streamsets.com>

Reviewers: Ismael Juma, Gwen Shapira

Closes #858 from kunickiaj/KAFKA-3198


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

Branch: refs/heads/trunk
Commit: 99956f56c9f994b4f55315559c07310b3d599d9b
Parents: d3ff902
Author: Adam Kunicki <ad...@streamsets.com>
Authored: Wed Feb 3 23:48:17 2016 -0800
Committer: Gwen Shapira <cs...@gmail.com>
Committed: Wed Feb 3 23:48:17 2016 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/kafka/common/security/kerberos/Login.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/99956f56/clients/src/main/java/org/apache/kafka/common/security/kerberos/Login.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/security/kerberos/Login.java b/clients/src/main/java/org/apache/kafka/common/security/kerberos/Login.java
index be91845..e8afbe6 100644
--- a/clients/src/main/java/org/apache/kafka/common/security/kerberos/Login.java
+++ b/clients/src/main/java/org/apache/kafka/common/security/kerberos/Login.java
@@ -151,7 +151,7 @@ public class Login {
                         nextRefresh = getRefreshTime(tgt);
                         long expiry = tgt.getEndTime().getTime();
                         Date expiryDate = new Date(expiry);
-                        if (isUsingTicketCache && tgt.getRenewTill() != null && tgt.getRenewTill().getTime() >= expiry) {
+                        if (isUsingTicketCache && tgt.getRenewTill() != null && tgt.getRenewTill().getTime() < expiry) {
                             log.error("The TGT cannot be renewed beyond the next expiry date: {}." +
                                     "This process will not be able to authenticate new SASL connections after that " +
                                     "time (for example, it will not be able to authenticate a new connection with a Kafka " +