junrao commented on a change in pull request #9001: URL: https://github.com/apache/kafka/pull/9001#discussion_r498420758
########## File path: clients/src/main/java/org/apache/kafka/common/feature/SupportedVersionRange.java ########## @@ -17,9 +17,16 @@ package org.apache.kafka.common.feature; import java.util.Map; +import java.util.Objects; +import org.apache.kafka.common.utils.Utils; /** - * An extended {@link BaseVersionRange} representing the min/max versions for supported features. + * An extended {@link BaseVersionRange} representing the min, max and first active versions for a + * supported feature: + * - minVersion: This is the minimum supported version for the feature. + * - maxVersion: This the maximum supported version for the feature. + * - firstActiveVersion: This is the first active version for the feature. Versions in the range Review comment: Thinking about this a bit more. It seems that the intention of firstActiveVersion is to avoid deploying a wrong version of the broker that causes the deprecation of a finalized feature version unexpectedly. However, the same mistake can happen with firstActiveVersion since the deprecation of a finalized feature version is based on firstActiveVersion. So, I am not sure if firstActiveVersion addresses a real problem. In general, we tend to deprecate a version very slowly in AK. So, if the mistake is to deploy a new release that actually deprecates a supported version. Old clients are likely all gone. So, moving finalized min version to supported min version may not cause a big problem. We can just document that people should make sure old versions are no longer used before deploying new releases. If the mistake is to deploy an old version of the broker whose maxSupportedVersion is < maxFinalizedVersion, we will fail the broker. So, this mistake can be prevented. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org