Skip to content

Commit 66b3c07

Browse files
authored
KAFKA-19576 Fix typo in state-change log filename after rotate (#20269)
The `state-change.log` file is being incorrectly rotated to `stage-change.log.[date]`. This change fixes the typo to have the log file correctly rotated to `state-change.log.[date]` _No functional changes._ Reviewers: Mickael Maison <[email protected]>, Christo Lolov <[email protected]>, Luke Chen <[email protected]>, Ken Huang <[email protected]>, TengYao Chi <[email protected]>, Chia-Ping Tsai <[email protected]>
1 parent cd9dde1 commit 66b3c07

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

config/log4j2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Configuration:
4444
# State Change appender
4545
- name: StateChangeAppender
4646
fileName: "${sys:kafka.logs.dir}/state-change.log"
47-
filePattern: "${sys:kafka.logs.dir}/stage-change.log.%d{yyyy-MM-dd-HH}"
47+
filePattern: "${sys:kafka.logs.dir}/state-change.log.%d{yyyy-MM-dd-HH}"
4848
PatternLayout:
4949
pattern: "${logPattern}"
5050
TimeBasedTriggeringPolicy:

docs/upgrade.html

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ <h5><a id="upgrade_410_notable" href="#upgrade_410_notable">Notable changes in 4
5757
The logger class name for LogCleaner has been updated from <code>kafka.log.LogCleaner</code> to <code>org.apache.kafka.storage.internals.log.LogCleaner</code> in the log4j2.yaml configuration file.
5858
Added loggers for <code>org.apache.kafka.storage.internals.log.LogCleaner$CleanerThread</code> and <code>org.apache.kafka.storage.internals.log.Cleaner</code> classes to CleanerAppender.
5959
</li>
60+
<li>
61+
The filename for rotated <code>state-change.log</code> files has been updated from <code>stage-change.log.[date]</code> to <code>state-change.log.[date]</code> in the log4j2.yaml configuration file.
62+
</li>
6063
</ul>
6164
</li>
6265
<li><b>Broker</b>
@@ -104,9 +107,9 @@ <h5><a id="upgrade_410_notable" href="#upgrade_410_notable">Notable changes in 4
104107
</li>
105108
</ul>
106109

107-
<h4><a id="upgrade_4_0_0_from" href="#upgrade_4_0_0_from">Upgrading to 4.0.0</a></h4>
110+
<h4><a id="upgrade_4_0_1_from" href="#upgrade_4_0_1_from">Upgrading to 4.0.1</a></h4>
108111

109-
<h5><a id="upgrade_clients_4_0_0" href="#upgrade_clients_4_0_0">Upgrading Clients to 4.0.0</a></h5>
112+
<h5><a id="upgrade_clients_4_0_1" href="#upgrade_clients_4_0_1">Upgrading Clients to 4.0.1</a></h5>
110113

111114
<p><b>For a rolling upgrade:</b></p>
112115

@@ -117,7 +120,7 @@ <h5><a id="upgrade_clients_4_0_0" href="#upgrade_clients_4_0_0">Upgrading Client
117120
or <a href="https://cwiki.apache.org/confluence/x/y4kgF">KIP-1124</a>.</li>
118121
</ol>
119122

120-
<h5><a id="upgrade_4_0_0" href="#upgrade_4_0_0">Upgrading Servers to 4.0.0 from any version 3.3.x through 3.9.x</a></h5>
123+
<h5><a id="upgrade_4_0_1" href="#upgrade_4_0_1">Upgrading Servers to 4.0.1 from any version 3.3.x through 3.9.x</a></h5>
121124

122125
<p>Note: Apache Kafka 4.0 only supports KRaft mode - ZooKeeper mode has been removed. As such, <b>broker upgrades to 4.0.0 (and higher) require KRaft mode and
123126
the software and metadata versions must be at least 3.3.x</b> (the first version when KRaft mode was deemed production ready). For clusters in KRaft mode
@@ -141,7 +144,13 @@ <h5><a id="upgrade_4_0_0" href="#upgrade_4_0_0">Upgrading Servers to 4.0.0 from
141144
has a boolean parameter that indicates if there are metadata changes (i.e. <code>IBP_4_0_IV1(23, "4.0", "IV1", true)</code> means this version has metadata changes).
142145
Given your current and target versions, a downgrade is only possible if there are no metadata changes in the versions between.</li>
143146
</ol>
144-
147+
<h5><a id="upgrade_servers_401_notable" href="#upgrade_servers_401_notable">Notable changes in 4.0.1</a></h5>
148+
<ul>
149+
<li>
150+
The filename for rotated <code>state-change.log</code> files has been updated from <code>stage-change.log.[date]</code> to <code>state-change.log.[date]</code> in the log4j2.yaml configuration file.
151+
See <a href="https://issues.apache.org/jira/browse/KAFKA-19576">KAFKA-19576</a> for details.
152+
</li>
153+
</ul>
145154
<h5><a id="upgrade_servers_400_notable" href="#upgrade_servers_400_notable">Notable changes in 4.0.0</a></h5>
146155
<ul>
147156
<li>
@@ -153,7 +162,7 @@ <h5><a id="upgrade_servers_400_notable" href="#upgrade_servers_400_notable">Nota
153162
</li>
154163
<li>
155164
Apache Kafka 4.0 only supports KRaft mode - ZooKeeper mode has been removed. About version upgrade,
156-
check <a href="/{{version}}/documentation.html#upgrade_4_0_0">Upgrading to 4.0.0 from any version 3.3.x through 3.9.x</a> for more info.
165+
check <a href="/{{version}}/documentation.html#upgrade_4_0_1">Upgrading to 4.0.1 from any version 3.3.x through 3.9.x</a> for more info.
157166
</li>
158167
<li>
159168
Apache Kafka 4.0 ships with a brand-new group coordinator implementation (See <a href="https://cwiki.apache.org/confluence/x/HhD1D">here</a>).
@@ -496,6 +505,10 @@ <h5><a id="upgrade_servers_400_notable" href="#upgrade_servers_400_notable">Nota
496505
<li> See <a href="https://cwiki.apache.org/confluence/x/B40ODg">KIP-890</a> and
497506
<a href="https://cwiki.apache.org/confluence/x/8ItyEg">KIP-1050</a> for more details </li>
498507
</ul>
508+
<li>
509+
The filename for rotated <code>state-change.log</code> files incorrectly rotates to <code>stage-change.log.[date]</code> (changing state to stage). This issue is corrected in 4.0.1.
510+
See <a href="https://issues.apache.org/jira/browse/KAFKA-19576">KAFKA-19576</a> for details.
511+
</li>
499512
</ul>
500513
</li>
501514
</ul>

0 commit comments

Comments
 (0)