huxihx created KAFKA-5665:
-----------------------------
Summary: Incorrect interruption invoking method used for Heartbeat
thread
Key: KAFKA-5665
URL: https://issues.apache.org/jira/browse/KAFKA-5665
Project: Kafka
Issue Type: Bug
Components: consumer
Affects Versions: 0.11.0.0
Reporter: huxihx
Assignee: huxihx
Priority: Minor
When interrupting the background heartbeat thread, `Thread.interrupted();` is
used. Actually, `Thread.currentThread().interrupt();` should be used to restore
the interruption status. An alternative way to solve is to remove
`Thread.interrupted();` since HeartbeatThread extends Thread and all code
higher up on the call stack is controlled, so we could safely swallow this
exception. Anyway, `Thread.interrupted();` should not be used here. It's a
test method not an action.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)