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

KAFKA-9539/StopReplicaRequest deletePartition changes may cause premature topic deletion handling in controller

    XMLWordPrintableJSON

    Details

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

      Description

      It seems like https://github.com/apache/kafka/commit/7c7d55dbd8d42f6378d13ba02d62633366a7ede8 does not handle StopReplicaRequest where deletePartition(s) is set to false correctly when another delete topic request is outstanding at the time of the response being received.

      In the failing code it seems like two StopReplicaRequest(s) are sent, one with the delete flag set on partitions, and one without. It seems like the request without the delete flag set on any partitions is prematurely triggering the controller to believe that the topic was deleted successfully.

      We previously didn't set a callback if the StopReplicaRequest was not a delete request https://github.com/apache/kafka/commit/7c7d55dbd8d42f6378d13ba02d62633366a7ede8#diff-987fef43991384a3ebec5fb55e53b577L570. Now we set it unconditionally https://github.com/apache/kafka/commit/7c7d55dbd8d42f6378d13ba02d62633366a7ede8#diff-987fef43991384a3ebec5fb55e53b577L570, but the callback does not distinguish between the partition states where a delete was being performed and where it was not. This happens on all IBP versions.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dajac David Jacot
                Reporter:
                lucasbradstreet Lucas Bradstreet
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: