chia7712 commented on code in PR #23522: URL: https://github.com/apache/kafka/pull/23522#discussion_r4289270102
########## server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java: ########## @@ -26,23 +26,23 @@ import java.util.stream.Collectors; /** - * This class contains the different Kafka versions. - * Right now, we use them for upgrades - users can configure the version of the API brokers will use to communicate between themselves. - * This is only for inter-broker communications - when communicating with clients, the client decides on the API version. + * This enum contains the different Kafka metadata versions. + * These versions are used during upgrades - users can configure which API version brokers use when communicating with each other. + * This setting only affects inter-broker communication. + * For client-broker communication, the client determines the API version to use. * <br> - * Note that the ID we initialize for each version is important. - * We consider a version newer than another if it is lower in the enum list (to avoid depending on lexicographic order) + * Note that the order of the versions in this enum is important. + * Versions are compared by their position in the enum rather than lexicographically. * <br> - * Since the api protocol may change more than once within the same release and to facilitate people deploying code from - * trunk, we have the concept of internal versions (first introduced during the 1.0 development cycle). For example, - * the first time we introduce a version change in a release, say 1.0, we will add a config value "1.0-IV0" and a - * corresponding enum constant IBP_1_0-IV0. We will also add a config value "1.0" that will be mapped to the - * latest internal version object, which is IBP_1_0-IV0. When we change the protocol a second time while developing - * 1.0, we will add a new config value "1.0-IV1" and a corresponding enum constant IBP_1_0-IV1. We will change - * the config value "1.0" to map to the latest internal version IBP_1_0-IV1. The config value of - * "1.0-IV0" is still mapped to IBP_1_0-IV0. This way, if people are deploying from trunk, they can use - * "1.0-IV0" and "1.0-IV1" to upgrade one internal version at a time. For most people who just want to use - * released version, they can use "1.0" when upgrading to the 1.0 release. + * Since the API protocol may change multiple times during the development of a single release, we use internal versions to + * represent each protocol change. + * For example, when the first protocol change is introduced during the development of 1.0, we add the config value `1.0-IV0` + * and the corresponding enum constant `IBP_1_0_IV0`. Review Comment: `IBP_1_0_IV0` was already removed. Could you refine the whole description based on current MVs? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
