Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2047

NotificationHookConsumer: Exception Thrown by Kafka Consumer Ends up Filling Logs Due to Incorrect Handling

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8-incubating
    • 0.8.2, 1.0.0
    • atlas-core
    • None

    Description

      Background

      KafkaConsumer is abstracted by AtlasKafkaConsumer. This is run using HookConsumer which is derived from kafka.utils.ShutdownableThread.

      The ShutdownableThread manages the thread. It handles exceptions thrown in the doWork method and logs them.

      Problem
      Exception reported in the bug is thrown by KafkaConsumer is handed by HookConsumer. Exception is logged but the thread keeps running. In cases where Kafa is in irrecoverable state, this behavior ends up filling up logs and providing no value in return.

      Solution
      Let ShutdownableThread hand exceptions thrown by KafkaConsumer. Stop the thread if KafkaConsumer suffers from irrecoverable error. This will avoid the situation described in the problem section.

      Attachments

        Activity

          People

            amestry Ashutosh Mestry
            amestry Ashutosh Mestry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: