From 5effe72390e0a3b7f82debcaaf069a531caaa351 Mon Sep 17 00:00:00 2001 From: Ismael Juma Date: Wed, 26 Jul 2017 13:01:41 -0700 Subject: [PATCH] MINOR: Next release will be 1.0.0 Author: Ismael Juma Reviewers: Guozhang Wang Closes #3580 from ijuma/bump-to-1.0.0-SNAPSHOT --- .../src/main/scala/kafka/api/ApiVersion.scala | 8 ++--- .../controller/ControllerChannelManager.scala | 4 +-- .../scala/kafka/server/ReplicaManager.scala | 2 +- docs/upgrade.html | 30 +++++++------------ gradle.properties | 2 +- kafka-merge-pr.py | 2 +- tests/kafkatest/__init__.py | 4 +-- 7 files changed, 21 insertions(+), 31 deletions(-) diff --git a/core/src/main/scala/kafka/api/ApiVersion.scala b/core/src/main/scala/kafka/api/ApiVersion.scala index 05658dd4717..a72d2e039e4 100644 --- a/core/src/main/scala/kafka/api/ApiVersion.scala +++ b/core/src/main/scala/kafka/api/ApiVersion.scala @@ -71,8 +71,8 @@ object ApiVersion { "0.11.0-IV2" -> KAFKA_0_11_0_IV2, "0.11.0" -> KAFKA_0_11_0_IV2, // Introduced LeaderAndIsrRequest V1, UpdateMetadataRequest V4 and FetchRequest V6 via KIP-112 - "0.11.1-IV0" -> KAFKA_0_11_1_IV0, - "0.11.1" -> KAFKA_0_11_1_IV0 + "1.0-IV0" -> KAFKA_1_0_IV0, + "1.0" -> KAFKA_1_0_IV0 ) private val versionPattern = "\\.".r @@ -175,8 +175,8 @@ case object KAFKA_0_11_0_IV2 extends ApiVersion { val id: Int = 12 } -case object KAFKA_0_11_1_IV0 extends ApiVersion { - val version: String = "0.11.1-IV0" +case object KAFKA_1_0_IV0 extends ApiVersion { + val version: String = "1.0-IV0" val messageFormatVersion: Byte = RecordBatch.MAGIC_VALUE_V2 val id: Int = 13 } diff --git a/core/src/main/scala/kafka/controller/ControllerChannelManager.scala b/core/src/main/scala/kafka/controller/ControllerChannelManager.scala index 8f9630eb757..b89fb62f8dc 100755 --- a/core/src/main/scala/kafka/controller/ControllerChannelManager.scala +++ b/core/src/main/scala/kafka/controller/ControllerChannelManager.scala @@ -394,7 +394,7 @@ class ControllerBrokerRequestBatch(controller: KafkaController) extends Logging def sendRequestsToBrokers(controllerEpoch: Int) { try { val leaderAndIsrRequestVersion: Short = - if (controller.config.interBrokerProtocolVersion >= KAFKA_0_11_1_IV0) 1 + if (controller.config.interBrokerProtocolVersion >= KAFKA_1_0_IV0) 1 else 0 leaderAndIsrRequestMap.foreach { case (broker, leaderAndIsrPartitionStates) => @@ -425,7 +425,7 @@ class ControllerBrokerRequestBatch(controller: KafkaController) extends Logging val partitionStates = Map(updateMetadataRequestPartitionInfoMap.toArray:_*) val updateMetadataRequestVersion: Short = - if (controller.config.interBrokerProtocolVersion >= KAFKA_0_11_1_IV0) 4 + if (controller.config.interBrokerProtocolVersion >= KAFKA_1_0_IV0) 4 else if (controller.config.interBrokerProtocolVersion >= KAFKA_0_10_2_IV0) 3 else if (controller.config.interBrokerProtocolVersion >= KAFKA_0_10_0_IV1) 2 else if (controller.config.interBrokerProtocolVersion >= KAFKA_0_9_0) 1 diff --git a/core/src/main/scala/kafka/server/ReplicaManager.scala b/core/src/main/scala/kafka/server/ReplicaManager.scala index 6cf25409993..7c2f8e6dcaa 100644 --- a/core/src/main/scala/kafka/server/ReplicaManager.scala +++ b/core/src/main/scala/kafka/server/ReplicaManager.scala @@ -300,7 +300,7 @@ class ReplicaManager(val config: KafkaConfig, // A follower can lag behind leader for up to config.replicaLagTimeMaxMs x 1.5 before it is removed from ISR scheduler.schedule("isr-expiration", maybeShrinkIsr _, period = config.replicaLagTimeMaxMs / 2, unit = TimeUnit.MILLISECONDS) scheduler.schedule("isr-change-propagation", maybePropagateIsrChanges _, period = 2500L, unit = TimeUnit.MILLISECONDS) - val haltBrokerOnFailure = config.interBrokerProtocolVersion < KAFKA_0_11_1_IV0 + val haltBrokerOnFailure = config.interBrokerProtocolVersion < KAFKA_1_0_IV0 logDirFailureHandler = new LogDirFailureHandler("LogDirFailureHandler", haltBrokerOnFailure) logDirFailureHandler.start() } diff --git a/docs/upgrade.html b/docs/upgrade.html index 37313b638bd..bb3274a84ee 100644 --- a/docs/upgrade.html +++ b/docs/upgrade.html @@ -17,9 +17,9 @@ -

Upgrading from 0.8.x, 0.9.x, 0.10.0.x, 0.10.1.x, 0.10.2.x or 0.11.0.0 to 0.11.1.0

-

Kafka 0.11.1.0 introduces wire protocol changes. By following the recommended rolling upgrade plan below, - you guarantee no downtime during the upgrade. However, please review the notable changes in 0.11.1.0 before upgrading. +

Upgrading from 0.8.x, 0.9.x, 0.10.0.x, 0.10.1.x, 0.10.2.x or 0.11.0.x to 1.0.0

+

Kafka 1.0.0 introduces wire protocol changes. By following the recommended rolling upgrade plan below, + you guarantee no downtime during the upgrade. However, please review the notable changes in 1.0.0 before upgrading.

For a rolling upgrade:

@@ -33,7 +33,7 @@
  • Upgrade the brokers one at a time: shut down the broker, update the code, and restart it.
  • -
  • Once the entire cluster is upgraded, bump the protocol version by editing inter.broker.protocol.version and setting it to 0.11.1. +
  • Once the entire cluster is upgraded, bump the protocol version by editing inter.broker.protocol.version and setting it to 1.0.0.
  • Restart the brokers one by one for the new protocol version to take effect.
  • @@ -46,8 +46,12 @@ Similarly for the message format version. -
    Notable changes in 0.11.1.0
    +
    Notable changes in 1.0.0
      +
    • Topic deletion is now enabled by default, since the functionality is now stable. Users who wish to + to retain the previous behavior should set the broker config delete.topic.enable to false. Keep in mind that topic deletion removes data and the operation is not reversible (i.e. there is no "undelete" operation)
    • +
    • For topics that support timestamp search if no offset can be found for a partition, that partition is now included in the search result with a null offset value. Previously, the partition was not included in the map. + This change was made to make the search behavior consistent with the case of topics not supporting timestamp search.
    • If the inter.broker.protocol.version is 0.11.1 or later, a broker will now stay online to serve replicas on live log directories even if there are offline log directories. A log directory may become offline due to IOException caused by hardware failure. Users need to monitor the per-broker metric offlineLogDirectoryCount to check @@ -56,7 +60,7 @@ if the version of client's FetchRequest or ProducerRequest does not support KafkaStorageException.
    -
    New Protocol Versions
    +
    New Protocol Versions
    • KIP-112: LeaderAndIsrRequest v1 introduces a partition-level is_new field.
    • KIP-112: UpdateMetadataRequest v4 introduces a partition-level offline_replicas field.
    • @@ -65,20 +69,6 @@
    • KIP-112: FetchResponse v6 introduces error code for KafkaStorageException.
    - -

    Upgrading from 0.8.x, 0.9.x, 0.10.0.x, 0.10.1.x, 0.10.2 or 0.11.0.0 to 1.0.0

    -

    1.0.0 is fully compatible with 0.11.0.0. The upgrade can be done one broker at a time by simply bringing it down, updating the code, and restarting it. -To upgrade from earlier versions, please review the 0.11.0.0 upgrade instructions. -

    - -
    Notable changes in 1.0.0
    -
      -
    • Topic deletion is now enabled by default, since the functionality is now stable. Users who wish to - to retain the previous behavior should set the broker config delete.topic.enable to false. Keep in mind that topic deletion removes data and the operation is not reversible (i.e. there is no "undelete" operation)
    • -
    • For topics that support timestamp search if no offset can be found for a partition, that partition is now included in the search result with a null offset value. Previously, the partition was not included in the map. - This change was made to make the search behavior consistent with the case of topics not supporting timestamp search. -
    -

    Upgrading from 0.8.x, 0.9.x, 0.10.0.x, 0.10.1.x or 0.10.2.x to 0.11.0.0

    Kafka 0.11.0.0 introduces a new message format version as well as wire protocol changes. By following the recommended rolling upgrade plan below, you guarantee no downtime during the upgrade. However, please review the notable changes in 0.11.0.0 before upgrading. diff --git a/gradle.properties b/gradle.properties index 6e8154452bd..485afa9f43a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,7 @@ group=org.apache.kafka # NOTE: When you change this version number, you should also make sure to update # the version numbers in tests/kafkatest/__init__.py and kafka-merge-pr.py. -version=0.11.1.0-SNAPSHOT +version=1.0.0-SNAPSHOT scalaVersion=2.11.11 task=build org.gradle.jvmargs=-XX:MaxPermSize=512m -Xmx1024m -Xss2m diff --git a/kafka-merge-pr.py b/kafka-merge-pr.py index 0206f1c371c..8cfae464529 100755 --- a/kafka-merge-pr.py +++ b/kafka-merge-pr.py @@ -72,7 +72,7 @@ RELEASE_BRANCH_PREFIX = "0." DEV_BRANCH_NAME = "trunk" -DEFAULT_FIX_VERSION = os.environ.get("DEFAULT_FIX_VERSION", "0.11.1.0") +DEFAULT_FIX_VERSION = os.environ.get("DEFAULT_FIX_VERSION", "1.0.0") def get_json(url): try: diff --git a/tests/kafkatest/__init__.py b/tests/kafkatest/__init__.py index 057b43acf82..85d668ea297 100644 --- a/tests/kafkatest/__init__.py +++ b/tests/kafkatest/__init__.py @@ -21,5 +21,5 @@ # # Instead, in development branches, the version should have a suffix of the form ".devN" # -# For example, when Kafka is at version 0.9.0.0-SNAPSHOT, this should be something like "0.9.0.0.dev0" -__version__ = '0.11.1.0.dev0' +# For example, when Kafka is at version 1.0.0-SNAPSHOT, this should be something like "1.0.0.dev0" +__version__ = '1.0.0.dev0'