Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9360

emitting checkpoint and heartbeat set to false will not disable the activity in their SourceTask

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.5.0
    • Component/s: mirrormaker
    • Labels:
      None

      Description

      `emit.heartbeats.enabled` and `emit.checkpoints.enabled` are supposed to be the knobs to control if the heartbeat message or checkpoint message will be sent or not to the topics respectively. In our experiments, setting them to false will not suspend the activity in their SourceTasks, e.g. MirrorHeartbeatTask, MirrorCheckpointTask.

      The observations are, when setting those knobs to false, huge volume of `SourceRecord` are being sent without interval, causing significantly high CPU usage of MirrorMaker 2 instance, GC time and congesting the single partition of the heartbeat topic and checkpoint topic.

      The proposed fix in the following PR is to (1) explicitly check if `interval` is set to negative (e.g. -1), when the `emit.heartbeats.enabled` or `emit.checkpoints.enabled` is off. (2) if `interval` is indeed set to negative, put the thread in sleep mode for a while (e.g. 5 seconds) and return null, in orderto prevent it from (1) hogging the cpu, (2) sending heartbeat or checkpoint messages to Kafka topics.

      PR link: https://github.com/apache/kafka/pull/7887

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yangguo1220 Ning Zhang
                Reporter:
                yangguo1220 Ning Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: