Commit Graph

15782 Commits

Author SHA1 Message Date
Alyssa Huang 97db06689b
KAFKA-18345; Wait the entire election timeout on election loss (#19747)
CI / build (push) Waiting to run Details
Replaces exponential backoff for candidate state after losing election
with waiting rest of election timeout. There is no need to have an
exponential backoff when the election timeout already provides a natural
throttle and it is randomized.

Reviewers: José Armando García Sancio <jsancio@apache.org>, TaiJuWu
 <tjwu1217@gmail.com>
2025-05-23 12:35:49 -04:00
Sushant Mahajan af4d048da6
MINOR: Bugfix in GroupMetadataManager.testShareGroupInitializeSuccess. (#19795)
Currently, we were asserting on records containing set using
`assertEquals` which can fail intermittently. To fix the assertion has
been replaced by `assertRecordEquals`.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai
 <chia7712@gmail.com>
2025-05-23 23:54:38 +08:00
Ken Huang bbe27e65a3
MINOR: Fix the CLIENT_QUOTA_CALLBACK_CLASS_CONFIG document (#18713)
See the discussion:

7fa0dfd72d (r1929621640)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-05-23 23:49:26 +08:00
Yunchi Pang 7da9457b36
KAFKA-19260 Move LoggingController to server module (#19687)
CI / build (push) Waiting to run Details
Move `LoggingController` to server module and rewrite it in java.

Reviewers: PoAn Yang <payang@apache.org>, Ken Huang
 <s7133700@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
 <chia7712@gmail.com>
2025-05-23 23:39:33 +08:00
Ming-Yen Chung e107e69a51
HOTFIX: Fix GroupMetadataManager#completeAlterShareGroupOffsets to use InitMapValue in addInitializingTopicsRecords (#19792)
https://github.com/apache/kafka/pull/19781/files#diff-00f0f81cf13e66781777d94f7d2e68a581663385c37e98792507f2294c91bb09L2746-R2745
changes the `addInitializingTopicsRecords` signature while
https://github.com/apache/kafka/pull/18929/files#r2104172356 didn't make
adjustment accordingly.

Fix GroupMetadataManager#completeAlterShareGroupOffsets to use
`InitMapValue` in `initializingTopics` so  that
`addInitializingTopicsRecords` can accept it.

Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Sushant Mahajan <sushant.mahajan88@gmail.com>, Kuan-Po Tseng <brandboat@gmail.com>, TengYao Chi <frankvicky@apache.org>, Shivsundar R <shr@confluent.io>, PoAn Yang <payang@apache.org>, Nick Guo <lansg0504@gmail.com>, Jhen-Yung Hsu <jhenyunghsu@gmail.com>
2025-05-23 13:07:37 +01:00
jimmy b44bfca408
KAFKA-16717 [2/N]: Add AdminClient.alterShareGroupOffsets (#18929)
[KAFKA-16720](https://issues.apache.org/jira/browse/KAFKA-16720) aims to
finish the AlterShareGroupOffsets RPC.

Reviewers: Andrew Schofield <aschofield@confluent.io>

---------

Co-authored-by: jimmy <wangzhiwang@qq.com>
2025-05-23 09:05:48 +01:00
Jhen-Yung Hsu 999afbbbf1
KAFKA-19069 DumpLogSegments does not dump the LEADER_CHANGE record (#19729)
## Description:
Add case for dumping LEADER_CHANGE record in DumpLogSegments.

- Extract the part of printing ControlRecord as a method.
- Add the unit test for printing the control record in dumpLog.

## Verification

### Before:
```
$ bin/kafka-dump-log.sh --cluster-metadata-decoder --files
try_KAFKA-19069/00000000000000000000.log
Dumping try_KAFKA-19069/00000000000000000000.log
Log starting offset: 0
baseOffset: 0 lastOffset: 2 count: 3 baseSequence: -1 lastSequence: -1
producerId: -1 producerEpoch: -1 partitionLeaderEpoch: 1
isTransactional: false isControl: true deleteHorizonMs:
OptionalLong.empty position: 0 CreateTime: 1747299887693 size: 174
magic: 2 compresscodec: none crc: 3714449884 isvalid: true
| offset: 0 CreateTime: 1747299887693 keySize: 4 valueSize: 19 sequence:
-1 headerKeys: [] controlType: LEADER_CHANGE(2)
| offset: 1 CreateTime: 1747299887693 keySize: 4 valueSize: 5 sequence:
-1 headerKeys: [] KRaftVersion {"version":0,"kRaftVersion":1}
| offset: 2 CreateTime: 1747299887693 keySize: 4 valueSize: 55 sequence:
-1 headerKeys: [] KRaftVoters
{"version":0,"voters":[{"voterId":1,"voterDirectoryId":"tpx8pd1IQDqJwMfGzXj6GA","endpoints":[{"name":"CONTROLLER","host":"localhost","port":9093}],"kRaftVersionFeature":{"minSupportedVersion":0,"maxSupportedVersion":1}}]}
```

### After:
```
$ bin/kafka-dump-log.sh --cluster-metadata-decoder --files
try_KAFKA-19069/00000000000000000000.log
Dumping try_KAFKA-19069/00000000000000000000.log
Log starting offset: 0
baseOffset: 0 lastOffset: 2 count: 3 baseSequence: -1 lastSequence: -1
producerId: -1 producerEpoch: -1 partitionLeaderEpoch: 1
isTransactional: false isControl: true deleteHorizonMs:
OptionalLong.empty position: 0 CreateTime: 1747299887693 size: 174
magic: 2 compresscodec: none crc: 3714449884 isvalid: true
| offset: 0 CreateTime: 1747299887693 keySize: 4 valueSize: 19 sequence:
-1 headerKeys: [] leaderChange:
{"version":0,"leaderId":1,"voters":[{"voterId":1}],"grantingVoters":[{"voterId":1}]}
| offset: 1 CreateTime: 1747299887693 keySize: 4 valueSize: 5 sequence:
-1 headerKeys: [] KRaftVersion {"version":0,"kRaftVersion":1}
| offset: 2 CreateTime: 1747299887693 keySize: 4 valueSize: 55 sequence:
-1 headerKeys: [] KRaftVoters
{"version":0,"voters":[{"voterId":1,"voterDirectoryId":"tpx8pd1IQDqJwMfGzXj6GA","endpoints":[{"name":"CONTROLLER","host":"localhost","port":9093}],"kRaftVersionFeature":{"minSupportedVersion":0,"maxSupportedVersion":1}}]}
```

Reviewers: PoAn Yang <payang@apache.org>, Chia-Ping Tsai
 <chia7712@gmail.com>
2025-05-23 15:58:35 +08:00
Sushant Mahajan c58de75712
KAFKA-19204: Add timestamp to share state metadata init maps [1/N] (#19781)
1.  Currently, the code allows for retrying any initializing topics in
subsequent heartbeats. This can result in duplicate calls to persister
if multiple share consumers join the same group concurrently.
Furthermore, only one of these will succeed as the others will have a
lower state epoch and will be fenced.
2. The existing change was made in
https://github.com/apache/kafka/pull/19603 to allow for retrying
initialization of initializing topics, in case the original caller was
not able to persist the information in the persister due to a dead
broker/timeout.
3. To prevent multiple calls as well as allow for retry we have
supplemented the timelinehashmap holding the
`ShareGroupStatePartitionMetadataInfo` to also hold the timestamp at
which this record gets replayed.
  a. Now when we get multiple consumers for the same group and topic,
only one of them is allowed to make the persister initialize request and
this information is added to the map when it is replayed. Thus solving
issue 1.
  b. To allow for retries, if an initializing topic is found with a
timestamp which is older than 2*offset_write_commit_ms, that topic will
be allowed to be retried. Here too only one consumer would be able to
retry thus resolving issue 2 as well.
4. Tests have been added wherever applicable and existing ones updated.
5. No record schema changes are involved.
6. The `ShareGroupStatePartitionMetadataInfo` and `InitMapValue` records
have been moved to the `ShareGroup` class for better encapsulation.
7. Some logs have been changed from error to info in
`ShareCoordinatorShard` and extra information is logged.

Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-05-23 08:56:05 +01:00
Yunchi Pang 5c3d7512de
MINOR: suppress removal warnings for listClientMetricsResources (#19787)
CI / build (push) Waiting to run Details
suppress removal warnings for `listClientMetricsResources`

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-05-23 04:07:14 +08:00
Ken Huang aacf3a4b3d
KAFKA-19042 Move PlaintextConsumerPollTest to client-integration-tests module (#19582)
Use Java to rewrite PlaintextConsumerPollTest by new test infra and move
it to client-integration-tests module.

Reviewers: PoAn Yang <payang@apache.org>, TengYao Chi
<kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-05-23 04:01:51 +08:00
Jing-Jia Hung bc797b077f
KAFKA-19314 Remove unnecessary code of closing snapshotWriter (#19763)
- Remove redundant close of `snapshotWriter`.
- `snapshotWriter` is already closed by `RaftSnapshotWriter#writer`.

Reviewers: Jhen-Yung Hsu <jhenyunghsu@gmail.com>, Ken Huang
 <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-05-23 03:57:14 +08:00
Ming-Yen Chung 21afc83f8e
HOTFIX: Fix testDeleteConsumerGroupOffsets (#19788)
Fix the change in
https://github.com/apache/kafka/pull/19380/files#r2102980872

Use `LinkedHashMap` instead of `Set` to  preserve the order of elements.

Reviewers: Jhen-Yung Hsu <jhenyunghsu@gmail.com>, Sanskar Jhajharia
 <sjhajharia@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2025-05-23 03:45:04 +08:00
Gaurav Narula 8f849f91f1
MINOR: Update Scala to v2.13.16 to support Java 24 (#19782)
Refer

https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#scala-compatibility-table

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-05-23 00:54:51 +08:00
PoAn Yang 30d7c71f09
KAFKA-18904: Add Admin#listConfigResources [2/N] (#19743)
CI / build (push) Waiting to run Details
* Add new functions `listConfigResources(Set<ConfigResource.Type>
configResourceTypes, ListConfigResourcesOptions options)` and
`listConfigResources()` to `Admin` interface.
  * New functions can list all kind of config resource types.
  * If input is a set with a type other than `CLIENT_METRICS` and
request version is 0, return `UnsupportedVersionException`.
* Deprecate functions
`listClientMetricsResources(ListClientMetricsResourcesOptions options)`
and `listClientMetricsResources()`.
* Deprecate classes `ListClientMetricsResourcesResult` and
`ClientMetricsResourceListing`.
* Change `ClientMetricsCommand` to use `listConfigResources`.
* Add integration tests to `PlaintextAdminIntegrationTest.java`.
* Add unit tests to `KafkaAdminClientTest.java`.

Reviewers: Andrew Schofield <aschofield@confluent.io>

---------

Signed-off-by: PoAn Yang <payang@apache.org>
2025-05-22 16:05:35 +01:00
Abhinav Dixit 239dce3e04
KAFKA-19291: Increase the timeout of remote storage share fetch requests in purgatory (#19757)
CI / build (push) Waiting to run Details
### About
Consumer groups have a different timeout `REMOTE_FETCH_MAX_WAIT_MS_PROP`
in delayed fetch purgatory for fetch requests having remote storage
fetch ([code

link](https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/ReplicaManager.scala#L1669)).
This is done before the request enters the purgatory, so its easy to
change. At the moment share groups can only have a `waitTimeMs` `of
shareFetch.fetchParams().maxWaitMs` (default value `500ms`) for delayed
share fetch purgatory regardless of whether they are remote
storage/local log fetch.
This PR introduces a way to increase the timeout of remote storage fetch
requests if a remote storage fetch request couldn't complete within
`shareFetch.fetchParams().maxWaitMs`, then we create a timer task which
can be interrupted whenever `pendingFetches` is finished. The change has
been done to avoid the expiration of remote storage share fetch
requests.

### Testing
The code has been tested with the help of unit tests and
`LocalTieredStorage.java`

Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>
2025-05-22 07:41:33 +01:00
lorcan e88c10d595
KAFKA-4650: Add unit tests for GraphNode class (#18951)
CI / build (push) Waiting to run Details
Unit tests added for the class GraphNode.

Change applied to GraphNode parentNodes() function to return a copy of
the collection, which is consistent with how the children() collection
is returned.

Reviewers: Bill Bejeck <bbejeck@apache.org>

---------

Co-authored-by: Lorcan <lorcanjames1@gmail.com>
2025-05-21 08:58:24 -04:00
Bolin Lin 388db49191
KAFKA-19287 document all group coordinator metrics (#19749)
add following metrics

1.
kafka.server:type=group-coordinator-metrics,name=event-queue-time-ms-p95
2.

kafka.server:type=group-coordinator-metrics,name=num-partitions,state=[loading|active|failed]
3.

kafka.server:type=group-coordinator-metrics,name=event-processing-time-ms-p95
4.

kafka.server:type=group-coordinator-metrics,name=event-purgatory-time-ms-p95
5.
kafka.server:type=group-coordinator-metrics,name=batch-flush-time-ms-p95

Reviewers: David Jacot <djacot@confluent.io>, Chia-Ping Tsai
 <chia7712@gmail.com>
2025-05-21 19:15:07 +08:00
Sanskar Jhajharia c9fcad7e86
MINOR: Cleanup Core Module- Scala Modules (1/n) (#19380)
Now that Kafka Brokers support Java 17, this PR makes some changes in
core module. The changes in this PR are limited to only the Scala files
in the Core module's tests. The unit tests module is still pending. It
shall follow next.  The changes mostly include:

- Collections.emptyList(), Collections.singletonList() and
Arrays.asList() are replaced with List.of()
- Collections.emptyMap() and Collections.singletonMap() are replaced
with Map.of()
- Collections.singleton() is replaced with Set.of()

To be clear, the directories being targeted in this PR are:
- core/src/test/scala/kafka
- core/src/test/scala/integration/kafka

Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
<chia7712@gmail.com>
2025-05-21 16:10:19 +08:00
Ken Huang 95d31befef
MINOR: update the gradle version for java 24 support (#19760)
Gradle 8.14 starts to support Java 24, so we should update the Gradle
version accordingly.

Reviewers: TengYao Chi <kitingiao@gmail.com>, PoAn Yang
<payang@apache.org>, Chia-Ping Tsai <chia7712@gmail.com>
2025-05-21 15:10:56 +08:00
TengYao Chi af11146bc9
MINOR: Add more description to KIP-1148 (#19768)
Given that we will remove the `log.cleaner.enable`, the related config
`log.cleaner.threads` will also have the respective adjustment.  This
patch will add a description to it.

For more details:

https://issues.apache.org/jira/browse/KAFKA-13610?focusedCommentId=17950756&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17950756

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-05-21 14:58:55 +08:00
Luke Chen f314497b63
MINOR: add 3.9.1 to system tests (#19772)
CI / build (push) Waiting to run Details
Add 3.9.1 to system tests following this release guide:

https://cwiki.apache.org/confluence/display/KAFKA/Release+Process#ReleaseProcess-Afterrelease

Reviewers: TengYao Chi <frankvicky@apache.org>
2025-05-21 14:09:00 +08:00
Sanskar Jhajharia 9711caca41
MINOR: Cleanup Shell Module (#19771)
Now that Kafka supports Java 17, this PR updates the shell module to get
rid of older code. The changes mostly include:
- Collections.emptyList(), Collections.singletonList() and
- Arrays.asList() are replaced with List.of()
- Replace switch statement with switch expression

Reviewers: PoAn Yang <payang@apache.org>, Yung
<yungyung7654321@gmail.com>, Ken Huang <s7133700@gmail.com>, TengYao Chi
<frankvicky@apache.org>
2025-05-21 12:47:45 +08:00
Kaushik Raina 896f283e1e
KAFKA-18783 : Extend InvalidConfigurationException related exceptions (#19731)
## Summary
Extend InvalidConfigurationException related exceptions
  - `AuthenticationException`
  - `AuthorizationException`
  - `ClusterAuthorizationException`
  - `TransactionalIdAuthorizationException`
  - `UnsupportedVersionException`
  - `UnsupportedForMessageFormatException`
  - `InvalidRecordException`
  - `InvalidRequiredAcksException`
  - `RecordBatchTooLargeException`
  - `InvalidTopicException`
  - `TopicAuthorizationException`
  - `GroupAuthorizationException`

## Testing
- Added unit tests in `TransactionExceptionHierarchyTest` to verify:
  - All configuration-related exceptions properly extend
`InvalidConfigurationException`

Reviewers: Justine Olshan <jolshan@confluent.io>
2025-05-20 16:31:33 -07:00
Ritika Reddy 37fdbb3575
MINOR:- Edit test in transaction command (#19746)
CI / build (push) Waiting to run Details
The test incorrectly used force-terminate instead of
forceTerminateTransaction

Reviewers: Justine Olshan <jolshan@confuent.io>, Kuan-Po Tseng
 <brandboat@gmail.com>, Ken Huang <s7133700@gmail.com>
2025-05-20 10:23:38 -07:00
Andy Li 38f3b2835d
MINOR: API Responses missing latest version in Kafka protocol guide (#19769)
### Issue: 

API Responses missing latest version in [Kafka protocol
guide](https://kafka.apache.org/protocol.html)

#### For example:

These are missing:

- ApiVersions Response (Version: 4) — Only versions 0–3 are documented,
though version 4 of the request is included.

- DescribeTopicPartitions Response — Not listed at all.

- Fetch Response (Version: 17) — Only versions 4–16 are documented,
though version 17 of the request is included.

#### After the fix:

docs/generated/protocol_messages.html

<img width="1045" alt="image"
src="https://github.com/user-attachments/assets/5ea79ced-aab5-4c47-8e09-9956047c9bf1"
/>

Reviewers: dengziming <dengziming1993@gmail.com>, Ken Huang
<s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-05-21 00:26:51 +08:00
Sanskar Jhajharia 9f293866ab
MINOR: Cleanup Share Coordinator (#19770)
CI / build (push) Waiting to run Details
Now that Kafka Brokers support Java 17, this PR updates the share
coordinator module to get rid of older code. The changes mostly include:
- Collections.emptyList(), Collections.singletonList() and
- Arrays.asList() are replaced with List.of()
- Collections.emptyMap() and Collections.singletonMap() are replaced
with Map.of()
- Collections.singleton() is replaced with Set.of()

Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-05-20 12:33:20 +01:00
TengYao Chi d3f8979486
MINOR: Update the supported tags in docker_scan.yml (#19766)
CI / build (push) Waiting to run Details
The 3.9.1-rc2 has been accepted as the new release. Hence, we should
update the supported tags.

Reviewers: Luke Chen <showuon@gmail.com>
2025-05-20 11:21:27 +08:00
PoAn Yang cff10e6541
KAFKA-19302 Move ReplicaState and Replica to server module (#19755)
CI / build (push) Waiting to run Details
1. Move `ReplicaState` and `Replica` to server module.
2. Rewrite `ReplicaState` and `Replica` in Java.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-05-19 23:59:12 +08:00
Ken Huang 6573b4ace1
KAFKA-19042 Move PlaintextConsumerCommitTest to client-integration-tests module (#19389)
Use Java to rewrite `PlaintextConsumerCommitTest` by new test infra and
move it to client-integration-tests module.

Reviewers: PoAn Yang <payang@apache.org>, Chia-Ping Tsai
<chia7712@gmail.com>
2025-05-19 21:51:42 +08:00
PoAn Yang c493d89334
KAFKA-17747: [3/N] Get rid of TopicMetadata in SubscribedTopicDescriberImpl (#19611)
CI / build (push) Waiting to run Details
Replace `TopicMetadata` with `MetadataImage` in
`SubscribedTopicDescriberImpl` and  `TargetAssignmentBuilder`.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Jacot
 <djacot@confluent.io>
2025-05-19 20:46:24 +08:00
Hong-Yi Chen ce4940f989
MINOR: Refactor shared-group request handle methods to return CompletableFuture for consistent error handling (#19724)
CI / build (push) Waiting to run Details
This PR is based on the discussion here:
https://github.com/apache/kafka/pull/18929#discussion_r2083238645

Currently, the handle methods related to `shared‐group` requests  are
inconsistent: some return `Unit` while others return
`CompletableFuture[Unit]` without a clear rationale. This PR
standardizes all of them to return `CompletableFuture[Unit]` and ensures
consistent error handling by chaining `.exceptionally(handleError)` to
each call site.

Reviewers: PoAn Yang <payang@apache.org>, Ken Huang
 <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-05-19 01:45:50 +08:00
Yunchi Pang 6596ba3a78
MINOR: Remove unnecessary test conditions where ListOffsetsRequest version is 0 (#19738)
Reviewers: Ken Huang <s7133700@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-05-19 00:20:24 +08:00
Lucas Brutschy f26974b16d
KAFKA-19202: Enable KIP-1071 in streams_eos_test (#19700)
CI / build (push) Waiting to run Details
Enable next system test with KIP-1071.

Some of the validation inside the test did not make sense for KIP-1071.
This is because in KIP-1071, if a member leaves or joins the group, not
all members may enter a REBALANCING state. We use the wrapper introduced
in   [KAFKA-19271](https://issues.apache.org/jira/browse/KAFKA-19271)
to print a log line whenever the member epoch is bumped, which is  the
only way a member can "indirectly" observe that other members  are
rebalancing.

Reviewers: Bill Bejeck <bill@confluent.io>
2025-05-17 21:20:47 +02:00
Lucas Brutschy bff1602df3
KAFKA-19280: Fix NoSuchElementException in UnifiedLog (#19717)
In FETCH requests and TXN_OFFSET_COMMIT requests, on current trunk we
run into a race condition inside UnifiedLog, causing a
`NoSuchElementException` in
`UnifiedLog.fetchLastStableOffsetMetadata(UnifiedLog.java:651)`.

The cause is that the line a performing an `isPresent` check on a
volatile Optional before accessing it in `get`, leaving the door open to
a race condition when the optional changes between `isPresent` and
`get`. This change takes a copy of the volatile variable first.
2025-05-17 21:17:38 +02:00
Bill Bejeck f397cbc14c
KAFKA-19256: Only send IQ metadata on assignment changes (#19691)
CI / build (push) Waiting to run Details
This PR adds changes, so the IQ endpoint information is only sent to
streams group members when there has been a change in the assignments
requiring an update in the streams client host-partition ownership.

The existing IQ integration test passes with no modifications and
updated the `GroupMetadataManagerTest` to cover the new process.

Reviewers: Matthias Sax <mjsax@apache.org>, Lucas Brutschy
 <lucasbru@apache.org>
2025-05-16 16:54:12 -04:00
Jhen-Yung Hsu ced56a320b
MINOR: Move logDirs config out of KafkaConfig (#19579)
CI / build (push) Waiting to run Details
Follow up https://github.com/apache/kafka/pull/19460/files#r2062664349

Reviewers: Ismael Juma <ismael@juma.me.uk>, PoAn Yang
<payang@apache.org>, TaiJuWu <tjwu1217@gmail.com>, Ken Huang
<s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-05-17 00:52:20 +08:00
Chirag Wadhwa 391b604c97
KAFKA-19226: Added test_console_share_consumer.py (#19708)
This PR includes the system test file test_console_share_consumer.py
which tests the functioning of ConsoleShareConsumer

Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-05-16 17:33:46 +01:00
David Jacot 199772adc5
KAFKA-19141; Persist topic id in OffsetCommit record (#19683)
This patch adds the `TopicId` field to the `OffsetCommitValue` record as
a tagged field. It will be later used on the offset fetch path to ensure
that the persisted offset matches the requested one.

Reviewers: Dongnuo Lyu <dlyu@confluent.io>, Sean Quah
 <squah@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2025-05-16 10:26:36 -04:00
Mickael Maison b0b8f13252
MINOR: Fix broken HTML tag in SESSION_TIMEOUT_MS_DOC (#19740)
The unclosed `<code>` tag breaks the formatting of the docs.

Reviewers: Ken Huang <s7133700@gmail.com>, Lianet Magrans
 <lmagrans@confluent.io>
2025-05-16 10:19:10 -04:00
Federico Valeri 102d35190b
MINOR: Add JmxReporter note to metric.reporters (#19706)
CI / build (push) Waiting to run Details
According to KIP-830, in Kafka 4 users currently relying on JmxReporter
and that are using additional reporters via metric.reporters will have
to include org.apache.kafka.common.metrics.JmxReporter in
metric.reporters.

Reviewers: Mickael Maison <mickael.maison@gmail.com>
2025-05-16 11:58:01 +02:00
Matthias J. Sax 34e426b517
KAFKA-19271: Add internal ConsumerWrapper (#19697)
With KIP-1071 enabled, the main consumer is created differently,  side
stepping `KafkaClientSupplier`.

To allow injection test wrappers, we add an internal ConsumerWrapper,
until we define a new public interface.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-05-16 11:57:37 +02:00
Bolin Lin 21ffc07212
MINOR: migrate MinInSyncReplicasConfigTest to server module (#19727)
Migrate MinInSyncReplicasConfigTest to the server module


Reviewers: PoAn Yang <payang@apache.org>, Yung
 <yungyung7654321@gmail.com>, TengYao Chi <frankvicky@apache.org>, Ken
 Huang <s7133700@gmail.com>
2025-05-16 17:18:28 +08:00
Andrew Schofield 7ae9a26fc2
MINOR: Mark RemoteIndexCacheTest.testConcurrentRemoveReadForCache1 flaky (#19732)
Marking flaky test as a result of 5% failure rate.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-05-16 09:03:08 +01:00
Sushant Mahajan e70d05ecda
KAFKA-19217: Fix ShareConsumerTest.testComplexConsumer flakiness. (#19734)
* Added alter offset to earliest.
* Reduced produce time to reduce overall test time.

Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-05-16 09:00:16 +01:00
Matthias J. Sax 8fc41f9ca2
KAFKA-19171: Kafka Streams crashes with UnsupportedOperationException (#19507)
This PR fixes a regression bug introduced with KAFKA-17203. We need to
pass in mutable collections into `closeTaskClean(...)`.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Bruno Cadonna <bruno@confluent.io>, Lucas Brutschy <lbrutschy@confluent.io>
2025-05-15 21:37:04 -07:00
Yunchi Pang f55565d321
KAFKA-19267 the min version used by ListOffsetsRequest should be 1 rather than 0 (#19709)
CI / build (push) Waiting to run Details
Updates the min version used by `ListOffsetsRequest` to
`ApiKeys.LIST_OFFSETS.oldestVersion()` rather than hardcoding `1`.

Reviewers: Ken Huang <s7133700@gmail.com>, PoAn Yang
 <payang@apache.org>, TengYao Chi <frankvicky@apache.org>, Chia-Ping
 Tsai <chia7712@gmail.com>
2025-05-16 10:33:16 +08:00
Matthias J. Sax bbf48ad677
KAFKA-19208: KStream-GlobalKTable join should not drop left-null-key record (#19580)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-05-15 18:34:07 -07:00
PoAn Yang c26b09c609
KAFKA-18904: [1/N] Change ListClientMetricsResources API to ListConfigResources (#19493)
* Change `ListClientMetricsResourcesRequest.json` to
`ListConfigResourcesRequest.json`.
* Change `ListClientMetricsResourcesResponse.json` to
`ListConfigResourcesResponse.json`.
* Change `ListClientMetricsResourcesRequest.java` to
`ListConfigResourcesRequest.java`.
* Change `ListClientMetricsResourcesResponse.java` to
`ListConfigResourcesResponsejava`.
* Change `KafkaApis` to handle both `ListClientMetricsResourcesRequest`
v0 and v1 requests.

Reviewers: Andrew Schofield <aschofield@confluent.io>

---------

Signed-off-by: PoAn Yang <payang@apache.org>
2025-05-15 23:39:00 +01:00
Andrew Schofield 567a03dd14
HOTFIX: Parameter mismatch in test for BrokerMetadataPublisher (#19733)
Recent changes to BrokerMetadataPublisher seem to have caused a mismatch
between the BrokerMetadataPublisher and its test.

Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Sushant Mahajan
 <smahajan@confluent.io>
2025-05-15 23:20:29 +01:00
Abhinav Dixit 2e0e9b9056
MINOR: Improvements for Persister APIs with respect to share group protocol enablement (#19719)
CI / build (push) Waiting to run Details
### About
Minor improvements to Persister APIs in KafkaApis with respect to share
group protocol enablement

### Testing
The new code added has been tested with the help of unit tests

Reviewers: Sushant Mahajan <sushant.mahajan88@gmail.com>, Apoorv Mittal <apoorvmittal10@gmail.com>
2025-05-15 18:29:16 +01:00