You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by mi...@apache.org on 2026/05/06 15:05:50 UTC
(kafka) branch trunk updated: HOTFIX: Fix SharePartition build error (#22222)
This is an automated email from the ASF dual-hosted git repository.
apoorvmittal10 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 5e6150caf7b HOTFIX: Fix SharePartition build error (#22222)
5e6150caf7b is described below
commit 5e6150caf7bde2e111c41f949b85c44c291a866c
Author: Ken Huang <s7...@gmail.com>
AuthorDate: Wed May 6 23:05:42 2026 +0800
HOTFIX: Fix SharePartition build error (#22222)
This Patch lead build error: https://github.com/apache/kafka/pull/22080
Reviewers: PoAn Yang <pa...@apache.org>, Apoorv Mittal
<ap...@gmail.com>, TengYao Chi <fr...@apache.org>,
Chia-Ping Tsai <ch...@gmail.com>
---
core/src/main/java/kafka/server/share/SharePartition.java | 10 +++++-----
.../src/test/java/kafka/server/share/SharePartitionTest.java | 12 ++++++------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/core/src/main/java/kafka/server/share/SharePartition.java b/core/src/main/java/kafka/server/share/SharePartition.java
index 2fbca75a72a..abe6bf53e83 100644
--- a/core/src/main/java/kafka/server/share/SharePartition.java
+++ b/core/src/main/java/kafka/server/share/SharePartition.java
@@ -1140,7 +1140,7 @@ public class SharePartition {
}
// Successfully updated the state of the offset and created a persister state batch for write to persister.
- Throwable dlqCause = updateResult.state() == RecordState.ARCHIVING ? ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED : null;
+ Throwable dlqCause = updateResult.state() == RecordState.ARCHIVING ? ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED : null;
persisterBatches.add(new PersisterBatch(updateResult, new PersisterStateBatch(offsetState.getKey(),
offsetState.getKey(), updateResult.state().id(), (short) updateResult.deliveryCount()), dlqCause));
if (offsetState.getKey() >= startOffset && isStateTerminal(updateResult.state())) {
@@ -1184,7 +1184,7 @@ public class SharePartition {
// Successfully updated the state of the batch and created a persister state batch for write to persister.
// If DLQ support is enabled, then update the DLQ cause exception message.
- Throwable dlqCause = updateResult.state() == RecordState.ARCHIVING ? ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED : null;
+ Throwable dlqCause = updateResult.state() == RecordState.ARCHIVING ? ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED : null;
persisterBatches.add(new PersisterBatch(updateResult, new PersisterStateBatch(inFlightBatch.firstOffset(),
inFlightBatch.lastOffset(), updateResult.state().id(), (short) updateResult.deliveryCount()), dlqCause));
if (isStateTerminal(updateResult.state())) {
@@ -2364,7 +2364,7 @@ public class SharePartition {
// This check makes sure that we don't skip the cause if updated result
// results in ARCHIVING due to max delivery count exceeded.
if (dlqCause == null && updateResult.state() == RecordState.ARCHIVING) {
- dlqCause = ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED;
+ dlqCause = ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED;
}
// Successfully updated the state of the offset and created a persister state batch for write to persister.
@@ -2451,7 +2451,7 @@ public class SharePartition {
// This check makes sure that we don't skip the cause if updated result
// results in ARCHIVING due to max delivery count exceeded.
if (dlqCause == null && updateResult.state() == RecordState.ARCHIVING) {
- dlqCause = ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED;
+ dlqCause = ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED;
}
// Successfully updated the state of the batch and created a persister state batch for write to persister.
@@ -2993,7 +2993,7 @@ public class SharePartition {
dlqBatch.firstOffset(),
dlqBatch.lastOffset(),
dlqBatch.deliveryCount(),
- ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED
+ ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED
));
});
}
diff --git a/core/src/test/java/kafka/server/share/SharePartitionTest.java b/core/src/test/java/kafka/server/share/SharePartitionTest.java
index 2732d4897f6..06d09556492 100644
--- a/core/src/test/java/kafka/server/share/SharePartitionTest.java
+++ b/core/src/test/java/kafka/server/share/SharePartitionTest.java
@@ -56,7 +56,7 @@ import org.apache.kafka.coordinator.group.GroupConfigManager;
import org.apache.kafka.coordinator.group.ShareGroupAutoOffsetResetStrategy;
import org.apache.kafka.coordinator.group.modern.share.ShareGroupConfigProvider;
import org.apache.kafka.server.share.acknowledge.ShareAcknowledgementBatch;
-import org.apache.kafka.server.share.dlq.ShareGroupDLQ;
+import org.apache.kafka.server.share.dlq.ShareGroupDLQManager;
import org.apache.kafka.server.share.fetch.AcquisitionLockTimerTask;
import org.apache.kafka.server.share.fetch.DelayedShareFetchGroupKey;
import org.apache.kafka.server.share.fetch.InFlightBatch;
@@ -13234,12 +13234,12 @@ public class SharePartitionTest {
private static Stream<Arguments> initiateDLQAndArchiveParameters() {
return Stream.of(
// name, persistSucceeds, expectedState, dlqCause, firstOffset, lastOffset, deliveryCount
- Arguments.of("persist succeeds", true, RecordState.ARCHIVED, ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED, 0L, 9L, (short) 2),
- Arguments.of("persist fails, no rollback", false, RecordState.ARCHIVED, ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED, 0L, 9L, (short) 2),
- Arguments.of("client reject cause", true, RecordState.ARCHIVED, ShareGroupDLQ.CLIENT_REJECT, 5L, 5L, (short) 1),
+ Arguments.of("persist succeeds", true, RecordState.ARCHIVED, ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED, 0L, 9L, (short) 2),
+ Arguments.of("persist fails, no rollback", false, RecordState.ARCHIVED, ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED, 0L, 9L, (short) 2),
+ Arguments.of("client reject cause", true, RecordState.ARCHIVED, ShareGroupDLQManager.CLIENT_REJECT, 5L, 5L, (short) 1),
Arguments.of("null cause", true, RecordState.ARCHIVED, null, 0L, 4L, (short) 1),
- Arguments.of("single offset", true, RecordState.ARCHIVED, ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED, 7L, 7L, (short) 3),
- Arguments.of("delivery count exceeded cause", true, RecordState.ARCHIVED, ShareGroupDLQ.DELIVERY_COUNT_EXCEEDED, 10L, 19L, (short) 5)
+ Arguments.of("single offset", true, RecordState.ARCHIVED, ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED, 7L, 7L, (short) 3),
+ Arguments.of("delivery count exceeded cause", true, RecordState.ARCHIVED, ShareGroupDLQManager.DELIVERY_COUNT_EXCEEDED, 10L, 19L, (short) 5)
);
}