Skip to content

Commit 17bd58a

Browse files
authored
MINOR: fix docs upgrade instructions fro 3.9 and 3.8 (apache#17447)
* MINOR: Fix upgrade instructions for 3.8 and 3.9 Signed-off-by: Josep Prat <[email protected]> Reviewers: Chia-Ping Tsai <[email protected]>, Colin McCabe <[email protected]>
1 parent 0129877 commit 17bd58a

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed

docs/upgrade.html

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,68 @@
2020
<script id="upgrade-template" type="text/x-handlebars-template">
2121

2222
<h4><a id="upgrade_3_9_0" href="#upgrade_3_9_0">Upgrading to 3.9.0 from any version 0.8.x through 3.8.x</a></h4>
23+
24+
<h5><a id="upgrade_390_zk" href="#upgrade_390_zk">Upgrading ZooKeeper-based clusters</a></h5>
25+
<p><b>If you are upgrading from a version prior to 2.1.x, please see the note in step 5 below about the change to the schema used to store consumer offsets.
26+
Once you have changed the inter.broker.protocol.version to the latest version, it will not be possible to downgrade to a version prior to 2.1.</b></p>
27+
28+
<p><b>For a rolling upgrade:</b></p>
29+
30+
<ol>
31+
<li>Update server.properties on all brokers and add the following properties. CURRENT_KAFKA_VERSION refers to the version you
32+
are upgrading from. CURRENT_MESSAGE_FORMAT_VERSION refers to the message format version currently in use. If you have previously
33+
overridden the message format version, you should keep its current value. Alternatively, if you are upgrading from a version prior
34+
to 0.11.0.x, then CURRENT_MESSAGE_FORMAT_VERSION should be set to match CURRENT_KAFKA_VERSION.
35+
<ul>
36+
<li>inter.broker.protocol.version=CURRENT_KAFKA_VERSION (e.g. <code>3.8</code>, <code>3.7</code>, etc.)</li>
37+
<li>log.message.format.version=CURRENT_MESSAGE_FORMAT_VERSION (See <a href="#upgrade_10_performance_impact">potential performance impact
38+
following the upgrade</a> for the details on what this configuration does.)</li>
39+
</ul>
40+
If you are upgrading from version 2.4.0 or above, and you have not overridden the message format, then you only need to override
41+
the inter-broker protocol version. However, before doing this, make sure ZooKeeper is upgraded to version 3.8.3 or higher.
42+
<ul>
43+
<li>inter.broker.protocol.version=CURRENT_KAFKA_VERSION (e.g. <code>3.8</code>, <code>3.7</code>, etc.)</li>
44+
</ul>
45+
</li>
46+
<li>Upgrade the brokers one at a time: shut down the broker, update the code, and restart it. Once you have done so, the
47+
brokers will be running the latest version and you can verify that the cluster's behavior and performance meets expectations.
48+
It is still possible to downgrade at this point if there are any problems.
49+
</li>
50+
<li>Once the cluster's behavior and performance has been verified, bump the protocol version by editing
51+
<code>inter.broker.protocol.version</code> and setting it to <code>3.9</code>.
52+
</li>
53+
<li>Restart the brokers one by one for the new protocol version to take effect. Once the brokers begin using the latest
54+
protocol version, it will no longer be possible to downgrade the cluster to an older version.
55+
</li>
56+
<li>If you have overridden the message format version as instructed above, then you need to do one more rolling restart to
57+
upgrade it to its latest version. Once all (or most) consumers have been upgraded to 0.11.0 or later,
58+
change log.message.format.version to 3.8 on each broker and restart them one by one. Note that the older Scala clients,
59+
which are no longer maintained, do not support the message format introduced in 0.11, so to avoid conversion costs
60+
(or to take advantage of <a href="#upgrade_11_exactly_once_semantics">exactly once semantics</a>),
61+
the newer Java clients must be used.
62+
</li>
63+
</ol>
64+
65+
<h5><a id="upgrade_390_kraft" href="#upgrade_390_kraft">Upgrading KRaft-based clusters</a></h5>
66+
<p><b>If you are upgrading from a version prior to 3.3.0, please see the note in step 3 below. Once you have changed the metadata.version to the latest version, it will not be possible to downgrade to a version prior to 3.3-IV0.</b></p>
67+
68+
<p><b>For a rolling upgrade:</b></p>
69+
70+
<ol>
71+
<li>Upgrade the brokers one at a time: shut down the broker, update the code, and restart it. Once you have done so, the
72+
brokers will be running the latest version and you can verify that the cluster's behavior and performance meets expectations.
73+
</li>
74+
<li>Once the cluster's behavior and performance has been verified, bump the metadata.version by running
75+
<code>
76+
bin/kafka-features.sh upgrade --metadata 3.9
77+
</code>
78+
</li>
79+
<li>Note that cluster metadata downgrade is not supported in this software version.
80+
Every <a href="https://github.com/apache/kafka/blob/trunk/server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java">MetadataVersion</a>
81+
after 3.2.x has a boolean parameter that indicates if there are metadata changes (i.e. <code>IBP_3_3_IV3(7, "3.3", "IV3", true)</code> means this version has metadata changes).
82+
Given your current and target versions, a downgrade is only possible if there are no metadata changes in the versions between.</li>
83+
</ol>
84+
2385
<h5><a id="upgrade_390_notable" href="#upgrade_390_notable">Notable changes in 3.9.0</a></h5>
2486
<ul>
2587
<li>In case you run your Kafka clusters with no execution permission for the <code>/tmp</code> partition, Kafka will not work properly. It might either refuse to start or fail
@@ -123,6 +185,67 @@ <h5><a id="upgrade_381_notable" href="#upgrade_381_notable">Notable changes in 3
123185

124186
<h4><a id="upgrade_3_8_0" href="#upgrade_3_8_0">Upgrading to 3.8.0 from any version 0.8.x through 3.7.x</a></h4>
125187

188+
<h5><a id="upgrade_380_zk" href="#upgrade_380_zk">Upgrading ZooKeeper-based clusters</a></h5>
189+
<p><b>If you are upgrading from a version prior to 2.1.x, please see the note in step 5 below about the change to the schema used to store consumer offsets.
190+
Once you have changed the inter.broker.protocol.version to the latest version, it will not be possible to downgrade to a version prior to 2.1.</b></p>
191+
192+
<p><b>For a rolling upgrade:</b></p>
193+
194+
<ol>
195+
<li>Update server.properties on all brokers and add the following properties. CURRENT_KAFKA_VERSION refers to the version you
196+
are upgrading from. CURRENT_MESSAGE_FORMAT_VERSION refers to the message format version currently in use. If you have previously
197+
overridden the message format version, you should keep its current value. Alternatively, if you are upgrading from a version prior
198+
to 0.11.0.x, then CURRENT_MESSAGE_FORMAT_VERSION should be set to match CURRENT_KAFKA_VERSION.
199+
<ul>
200+
<li>inter.broker.protocol.version=CURRENT_KAFKA_VERSION (e.g. <code>3.7</code>, <code>3.6</code>, etc.)</li>
201+
<li>log.message.format.version=CURRENT_MESSAGE_FORMAT_VERSION (See <a href="#upgrade_10_performance_impact">potential performance impact
202+
following the upgrade</a> for the details on what this configuration does.)</li>
203+
</ul>
204+
If you are upgrading from version 2.4.0 or above, and you have not overridden the message format, then you only need to override
205+
the inter-broker protocol version. However, before doing this, make sure ZooKeeper is upgraded to version 3.8.3 or higher.
206+
<ul>
207+
<li>inter.broker.protocol.version=CURRENT_KAFKA_VERSION (e.g. <code>3.7</code>, <code>3.6</code>, etc.)</li>
208+
</ul>
209+
</li>
210+
<li>Upgrade the brokers one at a time: shut down the broker, update the code, and restart it. Once you have done so, the
211+
brokers will be running the latest version and you can verify that the cluster's behavior and performance meets expectations.
212+
It is still possible to downgrade at this point if there are any problems.
213+
</li>
214+
<li>Once the cluster's behavior and performance has been verified, bump the protocol version by editing
215+
<code>inter.broker.protocol.version</code> and setting it to <code>3.8</code>.
216+
</li>
217+
<li>Restart the brokers one by one for the new protocol version to take effect. Once the brokers begin using the latest
218+
protocol version, it will no longer be possible to downgrade the cluster to an older version.
219+
</li>
220+
<li>If you have overridden the message format version as instructed above, then you need to do one more rolling restart to
221+
upgrade it to its latest version. Once all (or most) consumers have been upgraded to 0.11.0 or later,
222+
change log.message.format.version to 3.8 on each broker and restart them one by one. Note that the older Scala clients,
223+
which are no longer maintained, do not support the message format introduced in 0.11, so to avoid conversion costs
224+
(or to take advantage of <a href="#upgrade_11_exactly_once_semantics">exactly once semantics</a>),
225+
the newer Java clients must be used.
226+
</li>
227+
</ol>
228+
229+
<h5><a id="upgrade_380_kraft" href="#upgrade_380_kraft">Upgrading KRaft-based clusters</a></h5>
230+
<p><b>If you are upgrading from a version prior to 3.3.0, please see the note in step 3 below. Once you have changed the metadata.version to the latest version, it will not be possible to downgrade to a version prior to 3.3-IV0.</b></p>
231+
232+
<p><b>For a rolling upgrade:</b></p>
233+
234+
<ol>
235+
<li>Upgrade the brokers one at a time: shut down the broker, update the code, and restart it. Once you have done so, the
236+
brokers will be running the latest version and you can verify that the cluster's behavior and performance meets expectations.
237+
</li>
238+
<li>Once the cluster's behavior and performance has been verified, bump the metadata.version by running
239+
<code>
240+
bin/kafka-features.sh upgrade --metadata 3.8
241+
</code>
242+
</li>
243+
<li>Note that cluster metadata downgrade is not supported in this software version.
244+
Every <a href="https://github.com/apache/kafka/blob/trunk/server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java">MetadataVersion</a>
245+
after 3.2.x has a boolean parameter that indicates if there are metadata changes (i.e. <code>IBP_3_3_IV3(7, "3.3", "IV3", true)</code> means this version has metadata changes).
246+
Given your current and target versions, a downgrade is only possible if there are no metadata changes in the versions between.</li>
247+
</ol>
248+
126249
<h5><a id="upgrade_380_notable" href="#upgrade_380_notable">Notable changes in 3.8.0</a></h5>
127250
<ul>
128251
<li>MirrorMaker 2 can now emit checkpoints for offsets mirrored before the start of the Checkpoint task for improved offset translation.

0 commit comments

Comments
 (0)