You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ab...@apache.org on 2021/04/14 20:16:19 UTC

[kafka] branch 2.6 updated: KAFKA-12667: Fix incorrect error log on StateDirectory close (#10536)

This is an automated email from the ASF dual-hosted git repository.

ableegoldman pushed a commit to branch 2.6
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.6 by this push:
     new f4eb389  KAFKA-12667: Fix incorrect error log on StateDirectory close (#10536)
f4eb389 is described below

commit f4eb389fd2625efa19083b67d6c772e497fec36d
Author: A. Sophie Blee-Goldman <so...@confluent.io>
AuthorDate: Wed Apr 14 13:09:03 2021 -0700

    KAFKA-12667: Fix incorrect error log on StateDirectory close (#10536)
    
    This condition was fixed on the side in a PR against trunk, we should backport it to 2.8 and 2.7 at least
    
    Reviewers: Matthias J. Sax <mj...@confluent.io>, John Roesler <jo...@confluent.io>
---
 .../org/apache/kafka/streams/processor/internals/StateDirectory.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java b/streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java
index eca86c5..66e28a7 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java
@@ -406,7 +406,7 @@ public class StateDirectory {
             }
 
             // all threads should be stopped and cleaned up by now, so none should remain holding a lock
-            if (locks.isEmpty()) {
+            if (!locks.isEmpty()) {
                 log.error("Some task directories still locked while closing state, this indicates unclean shutdown: {}", locks);
             }
             if (globalStateLock != null) {