Skip to content

Commit

Permalink
fix(backpressure): start before registering to dynamic configs (#2208)
Browse files Browse the repository at this point in the history
Signed-off-by: Ning Yu <[email protected]>
  • Loading branch information
Chillax-0v0 authored Dec 3, 2024
1 parent 1cdce66 commit eab1c07
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions core/src/main/scala/kafka/server/BrokerServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,13 @@ class BrokerServer(
() => lifecycleManager.resendBrokerRegistrationUnlessZkMode())
metadataPublishers.add(brokerRegistrationTracker)

// AutoMQ inject start
backPressureManager = new DefaultBackPressureManager(
BackPressureConfig.from(config),
newBackPressureRegulator()
)
backPressureManager.start()
// AutoMQ inject end

// Register parts of the broker that can be reconfigured via dynamic configs. This needs to
// be done before we publish the dynamic configs, so that we don't miss anything.
Expand Down Expand Up @@ -551,12 +558,6 @@ class BrokerServer(
newPartitionLifecycleListeners().forEach(l => {
_replicaManager.addPartitionLifecycleListener(l)
})

backPressureManager = new DefaultBackPressureManager(
BackPressureConfig.from(config),
newBackPressureRegulator()
)
backPressureManager.start()
// AutoMQ inject end

// We're now ready to unfence the broker. This also allows this broker to transition
Expand Down

0 comments on commit eab1c07

Please sign in to comment.