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

Add logging to distinguish between internally and externally initiated shutdown of Kafka

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.11.0.0
    • 1.0.0
    • None
    • None

    Description

      Currently, if there is an internal error that triggers a shutdown of the Kafka server, the Exit class is used, which begins the shutdown procedure. The other way a shutdown is triggered is by SIGTERM or some other signal.

      We would like to distinguish between shutdown due to internal errors and external signals. This helps when debugging. Particularly, a natural question when a broker shuts down unexpectedly is: "did the deployment system send the signal or is there some un logged fatal error in the broker"?

      Today, we rely on callers of Exit to log the error before making the call. However, this won't always have 100% coverage. It would be good to add a log message in Exit to record that an exit method was invoked explicitly.

      We could also add a signal handler to log when SIGTERM, SIGKILL etc. are received.

      This would make operating Kafka a bit easier.

      Attachments

        Issue Links

          Activity

            People

              rsivaram Rajini Sivaram
              apurva Apurva Mehta
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: