KAFKA-9263 The new hw is added to incorrect log when ReplicaAlterLogD…#9423
KAFKA-9263 The new hw is added to incorrect log when ReplicaAlterLogD…#9423chia7712 merged 1 commit intoapache:trunkfrom
Conversation
pass on my local. |
|
@hachikuji @lbradstreet Could you take a look? |
27ea5c2 to
d3c9337
Compare
743a2eb to
05217f5
Compare
|
@junrao Could you take a look? There is no report about this bug in production but we can reproduce the bug by |
They are unrelated error. Will rebase PR to trigger QA again. |
|
|
…irsThread is replacing log (fix PlaintextAdminIntegrationTest.testAlterReplicaLogDirs)
|
@junrao I will merge it to trunk tomorrow if there is no objection. |
…t-for-generated-requests * apache-github/trunk: KAFKA-9263 The new hw is added to incorrect log when ReplicaAlterLogDirsThread is replacing log (fix PlaintextAdminIntegrationTest.testAlterReplicaLogDirs) (apache#9423) KAFKA-10729; Bump remaining RPC's to use tagged fields. (apache#9601) clients/src/main/java/org/apache/kafka/common/requests/AbstractResponse.java clients/src/main/java/org/apache/kafka/common/requests/AlterReplicaLogDirsResponse.java clients/src/test/java/org/apache/kafka/clients/NetworkClientTest.java
issue: https://issues.apache.org/jira/browse/KAFKA-9263
The following actions results in this issue.
The solution is that the action 1 and 3 must be executed within same read lock of leaderIsrUpdateLock to avoid adding new hw to invalid log (which is replaced by ReplicaAlterLogDirsThread)
Test Plan
Relying on
PlaintextAdminIntegrationTest.testAlterReplicaLogDirs. I have looped the test with this patch 100 times. all passCommitter Checklist (excluded from commit message)