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

Unexpected UNKNOWN_SERVER_ERROR raised from kraft controller

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 3.3.0
    • None
    • None

    Description

      In `ControllerApis`, we have callbacks such as the following after completion:

          controller.allocateProducerIds(context, allocatedProducerIdsRequest.data)
            .handle[Unit] { (results, exception) =>
              if (exception != null) {
                requestHelper.handleError(request, exception)
              } else {
                requestHelper.sendResponseMaybeThrottle(request, requestThrottleMs => {
                  results.setThrottleTimeMs(requestThrottleMs)
                  new AllocateProducerIdsResponse(results)
                })
              }
            } 

      What I see locally is that the underlying exception that gets passed to `handle` always gets wrapped in a `CompletionException`. When passed to `getErrorResponse`, this error will get converted to `UNKNOWN_SERVER_ERROR`. For example, in this case, a `NOT_CONTROLLER` error returned from the controller would be returned as `UNKNOWN_SERVER_ERROR`. It looks like there are a few APIs that are potentially affected by this bug, such as `DeleteTopics` and `UpdateFeatures`.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hachikuji Jason Gustafson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: