[
https://issues.apache.org/jira/browse/KAFKA-19228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Wu updated KAFKA-19228:
-----------------------------
Description:
When formatting, explicitly setting the kraft.version feature level with
--feature kraft.version=X should not be supported. Instead, this feature's
level should be inferred from the presence/absence of the following flags:
--standalone, --initial-controllers, --no-initial-controllers.
* When --standalone or --initial-controllers is specified, this node is using
kraft.version=1, and will write a bootstrap snapshot with the KRaft version and
voter set control records.
* When --no-initial-controllers is specified, the feature level will end up
unset because it is not used to write the bootstrap snapshot like with
--initial-controllers and --standalone. Instead, the node will default to
kraft.version 0 and potentially discover a higher feature level by fetching the
log.
* If none of these flags are specified, the static config
controller.quorum.voters must be defined.
was:
The current implementation of this flag will write kraft version 1 to the
`bootstrap.checkpoint` file. However, this is not exactly correct. KRaft
version 1 means the voter set is discoverable from the log, but here we have
KRaft version 1 but no voter set yet on this node.
The intention of setting this flag is to indicate the cluster is bootstrapped
with a voter set, and therefore should essentially be a no-op (i.e. it should
not write this version record anywhere). It sort of behaves like this, since we
do not write a dynamic quorum snapshot unlike when setting `–standalone` or
`--initial-controllers`.
Â
This is important because this means a cluster with kraft version 0 that
discovers the voter set via the `controller.quorum.voters` static config can
also be formatted with this flag set without throwing an error.
> `kafka-storage format` should not support explicitly setting kraft.version
> feature level
> ----------------------------------------------------------------------------------------
>
> Key: KAFKA-19228
> URL: https://issues.apache.org/jira/browse/KAFKA-19228
> Project: Kafka
> Issue Type: Bug
> Reporter: Kevin Wu
> Assignee: Kevin Wu
> Priority: Major
>
> When formatting, explicitly setting the kraft.version feature level with
> --feature kraft.version=X should not be supported. Instead, this feature's
> level should be inferred from the presence/absence of the following flags:
> --standalone, --initial-controllers, --no-initial-controllers.
> * When --standalone or --initial-controllers is specified, this node is
> using kraft.version=1, and will write a bootstrap snapshot with the KRaft
> version and voter set control records.
> * When --no-initial-controllers is specified, the feature level will end up
> unset because it is not used to write the bootstrap snapshot like with
> --initial-controllers and --standalone. Instead, the node will default to
> kraft.version 0 and potentially discover a higher feature level by fetching
> the log.
> * If none of these flags are specified, the static config
> controller.quorum.voters must be defined.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)