Skip to content

Commit

Permalink
MINOR: clarify assertion in handleListPartitionReassignmentsRequest a…
Browse files Browse the repository at this point in the history
…pache#11219

Reviewers: Colin P. McCabe <[email protected]>, José Armando García Sancio <[email protected]>, Ron Dagostino <[email protected]>
  • Loading branch information
dengziming authored Aug 16, 2021
1 parent 64b8e17 commit 38fd061
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/kafka/server/KafkaApis.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,7 @@ class KafkaApis(val requestChannel: RequestChannel,
}

def handleListPartitionReassignmentsRequest(request: RequestChannel.Request): Unit = {
val zkSupport = metadataSupport.requireZkOrThrow(KafkaApis.notYetSupported(request))
val zkSupport = metadataSupport.requireZkOrThrow(KafkaApis.shouldAlwaysForward(request))
authHelper.authorizeClusterOperation(request, DESCRIBE)
val listPartitionReassignmentsRequest = request.body[ListPartitionReassignmentsRequest]

Expand Down
6 changes: 6 additions & 0 deletions core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4000,4 +4000,10 @@ class KafkaApisTest {
metadataCache = MetadataCache.kRaftMetadataCache(brokerId)
verifyShouldAlwaysForward(createKafkaApis(raftSupport = true).handleUpdateFeatures)
}

@Test
def testRaftShouldAlwaysForwardListPartitionReassignments(): Unit = {
metadataCache = MetadataCache.kRaftMetadataCache(brokerId)
verifyShouldAlwaysForward(createKafkaApis(raftSupport = true).handleListPartitionReassignmentsRequest)
}
}

0 comments on commit 38fd061

Please sign in to comment.