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

Kafka server returns UnknownServerException for inherited exceptions

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0.0
    • Component/s: core
    • Labels:
      None

      Description

      This issue was introduced in KAFKA-2929. The problem is that we are using o.a.k.common.protocol.Errors.forException() while some exceptions thrown by the broker are still using old scala exception. This cause Errors.forException() always return UnknownServerException.

      InvalidMessageException is inherited from CorruptRecordException. But it seems Errors.forException() needs the exception class to be the exact class, so it does not map the subclass InvalidMessageException to the correct error code. Instead it returns -1 which is UnknownServerException.

        Attachments

          Activity

            People

            • Assignee:
              granthenke Grant Henke
              Reporter:
              becket_qin Jiangjie Qin
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: