mirror of https://github.com/apache/kafka.git
MINOR: RegisterBroker should use an atomic append (#11700)
The batch of records that registers a new broker should be committed atomically. This doesn't matter right now, because we only create a single record to register the broker. But if we create multiple records in the future, this could matter. In order to avoid confusion, this should use ControllerResult#atomicOf. Reviewers: David Arthur <mumrah@gmail.com>
This commit is contained in:
parent
448e44a734
commit
486cbd4793
|
@ -252,7 +252,7 @@ public class ClusterControlManager {
|
|||
List<ApiMessageAndVersion> records = new ArrayList<>();
|
||||
records.add(new ApiMessageAndVersion(record,
|
||||
REGISTER_BROKER_RECORD.highestSupportedVersion()));
|
||||
return ControllerResult.of(records, new BrokerRegistrationReply(brokerEpoch));
|
||||
return ControllerResult.atomicOf(records, new BrokerRegistrationReply(brokerEpoch));
|
||||
}
|
||||
|
||||
public void replay(RegisterBrokerRecord record) {
|
||||
|
|
Loading…
Reference in New Issue