Commit Graph

12684 Commits

Author SHA1 Message Date
Arnout Engelen bed23b7978
MINOR: skip 'zinc' phase from gradle dependency-check plugin (#15054)
This avoids `gradle dependencyCheckAggregate` from reporting on
advisories in build-time dependencies (e.g. CVE-2023-46122) which
typically should not affect us.

I checked that this does not prevent advisories in 'regular'
dependencies from being reported (but there currently are none).

Reviewers: Josep Prat <josep.prat@aiven.io>
2024-04-25 16:10:30 +02:00
Kirk True dcdf812880
KAFKA-16609: Update parse_describe_topic to support new topic describe output (#15799)
The format of the 'describe topic' output was changed as part of KAFKA-15585 which required an update in the parsing logic used by system tests.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-04-25 11:12:42 +02:00
Chia-Ping Tsai 4e23378aa8
HOTFIX: make sure all ConsumerGroupServices get closed (#15801)
Some services are not closed, so our CI print following error.

org.opentest4j.AssertionFailedError: Found 16 unexpected threads during @BeforeAll: `kafka-admin-client-thread | adminclient-287,kafka-admin-client-thread | adminclient-276,kafka-admin-client-thread | adminclient-271,kafka-admin-client-thread | adminclient-293,kafka-admin-client-thread | adminclient-281,kafka-admin-client-thread | adminclient-302,kafka-admin-client-thread | adminclient-334,kafka-admin-client-thread | adminclient-323,kafka-admin-client-thread | adminclient-257,kafka-admin-client-thread | adminclient-336,kafka-admin-client-thread | adminclient-308,kafka-admin-client-thread | adminclient-263,kafka-admin-client-thread | adminclient-273,kafka-admin-client-thread | adminclient-278,kafka-admin-client-thread | adminclient-283,kafka-admin-client-thread | adminclient-317` ==> expected: <true> but was: <false>

#15679 use AfterEach to release service. However, the test cases having multi consumerConfigs will create a lot of services in testing. Hence, the intermediate servers are not closed.

Reviewers: Luke Chen <showuon@gmail.com>
2024-04-25 14:23:34 +08:00
TingIāu "Ting" Kì 864744ffd4
KAFKA-16610 Replace "Map#entrySet#forEach" by "Map#forEach" (#15795)
Reviewers: Apoorv Mittal <amittal@confluent.io>, Igor Soarez <soarez@apple.com>
2024-04-25 01:52:24 +01:00
Justine Olshan a7ceacdd35
KAFKA-16571: reassign_partitions_test.bounce_brokers should wait for messages to be sent to every partition (#15739)
Added the check before the reassignment occurs and we start bouncing brokers.

Reviewers: David Mao <dmao@confluent.io>, David Jacot <djacot@confluent.io>
2024-04-24 17:30:20 -07:00
PoAn Yang 81c222e977
KAFKA-16613 remove TestUtils#subscribeAndWaitForRecords (#15794)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-25 02:15:21 +08:00
vamossagar12 b8b2415d5e
KAFKA-16592 Add a new constructor which invokes the existing constructor with default value for alternativeString (#15762)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-24 20:58:29 +08:00
PoAn Yang 960794a677
KAFKA-16483 migrate DeleteOffsetsConsumerGroupCommandIntegrationTest to use ClusterTestExtensions (#15679)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-24 19:07:58 +08:00
Kamal Chandraprakash a8c0f2b98f
KAFKA-16605: Fix the flaky LogCleanerParameterizedIntegrationTest (#15787)
Even if the log start offset is updated, the log deletion might still not completed. Making the test more robust.

Reviewers: Luke Chen <showuon@gmail.com>
2024-04-24 17:52:52 +08:00
PoAn Yang a38185280c
KAFKA-16424: remove truncated logs after alter dir (#15616)
If there are some logs to be deleted during the log dir movement, we'll send for a scheduler to do the deletion later.
However, when the log dir movement completed, the future log is renamed, the async log deletion will fail with no file existed error.

Signed-off-by: PoAn Yang <payang@apache.org>

Reviewers: Luke Chen <showuon@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, SoontaekLim <soontaek.lim@neya.kr>, Johnny Hsu <johnnyhsu@fb.com>
2024-04-24 17:51:29 +08:00
Omnia Ibrahim cfe5ab5cf2
KAFKA-15853 Move quota configs into server-common package (#15774)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-24 13:05:18 +08:00
Cheng-Kai, Zhang b6e70e9a54
MINOR: Add test for PartitionMetadataFile (#15714)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-24 13:01:35 +08:00
Omnia Ibrahim 1b301b3020
KAFKA-15853 Move socket configs into org.apache.kafka.network.SocketServerConfigs (#15772)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-23 17:39:36 +08:00
Gyeongwon, Do e6b6b6c1c2
MINOR: Remove extra "}" logged in KafkaStreams close (#15783)
Reviewers: Igor Soarez <soarez@apple.com>
2024-04-23 09:45:36 +01:00
Kirk True 53f9675b33
KAFKA-16461: New consumer fails to consume records in security_test.py system test (#15746)
The system test was failing because the VerifiableConsumer failed with a NullPointerException during startup. The reason for the NPE was an attempt to put a null as the value of --group-remote-assignor in the Consumer's configuration.

Reviewers: Lianet Magrans <lianetmr@gmail.com>, Lucas Brutschy <lbrutschy@confluent.io>
2024-04-23 10:28:07 +02:00
Kamal Chandraprakash 18572f5f8f
MINOR: Reduce the time taken to execute the TieredStorage tests. (#15780)
Reduce the time taken to execute the TieredStorage tests

Reviewers: Luke Chen <showuon@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-23 10:21:46 +08:00
ilyazr b254e787cb
KAFKA-16466: Log exception message for non-fault errors in QuorumController (#15701)
The generic error handler of QuorumController didn't log the exception message for non-fault errors, which includes very useful debugging info.

Reviewers: Igor Soarez <soarez@apple.com>
2024-04-23 02:01:36 +01:00
Eugene Mitskevich 59c781415f
MINOR: Fix io-[wait-]ratio metrics description (#15722)
Implementation of KIP-773 deprecated iotime-total and io-waittime-total metrics. It wasn't expected to mark io-ratio and io-wait-ratio deprecated. However, now they have *Deprecated* in their description. Here is the reason:

    register io-ratio (desc: *Deprecated* The fraction of time ...) -> registered
    register iotime-total (desc: *Deprecated* The total time ...) -> registered
    register io-ratio (desc: The fraction of time ...) -> skipped, the same name already exists in registry
    register io-time-ns-total (desc: The total time ...) -> registered

As a result, io-ratio has incorrect description. The same for io-wait-ratio. This PR fixes these descriptions..

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-22 21:50:38 +08:00
Ken Huang fb529d8966
KAFKA-16548 Avoid decompressing/collecting all records when all we want to do is to find a single matched record from remote storage (#15765)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-22 21:23:11 +08:00
charliecheng630 1763fe19dd
KAFKA-16549 suppress the warnings from RemoteLogManager (#15767)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-22 20:42:17 +08:00
Yu-Chen Lai c519c5c3be
MINOR: use assertInstanceOf to replace assertTrue (#15769)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-22 20:37:21 +08:00
Andras Katona f9f65b92cd
MINOR: example.com moved (#15758)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Kuan-Po (Cooper) Tseng <brandboat@gmail.com>, Viktor Somogyi-Vass <viktorsomogyi@gmail.com>
2024-04-22 13:37:59 +02:00
Lucas Brutschy ed47e37b28
KAFKA-16103: AsyncConsumer should await pending async commits on commitSync and close (#15613)
The javadoc for KafkaConsumer.commitSync says:

Note that asynchronous offset commits sent previously with the {@link #commitAsync(OffsetCommitCallback)}
(or similar) are guaranteed to have their callbacks invoked prior to completion of this method.

This is not always true in the async consumer, where there is no code at all to make sure that the callback is executed before commitSync returns.

Similarly, the async consumer is also missing logic to await callback execution in close. While the javadoc doesn't explicitly promise callback execution, it promises "completing commits", which one would reasonably expect to include callback execution. Also, the legacy consumer contains some code to execute callbacks before closing.

This change proposed a number of fixes to clean up the callback execution guarantees in the async consumer:

We keep track of the incomplete async commit
futures and wait for them to complete before returning from
commitSync or close (if there is time).
Since we need to block to make sure that our previous commits are
completed, we allow the consumer to wake up.
Some similar gaps are addressed in the legacy consumer, see #15693

Testing
Two new integration tests and a couple of unit tests.

Reviewers: Bruno Cadonna <cadonna@apache.org>, Kirk True <ktrue@confluent.io>, Lianet Magrans <lianetmr@gmail.com>
2024-04-22 13:26:15 +02:00
Vedarth Sharma e4d34ddd20
MINOR: Fix CDS in docker image (#15771)
Due to difference in packages present when jsa files were generated and when docker image is generated, there is a log on starting docker image.

[0.001s][warning][cds] The shared archive file has a bad magic number: 0

There is no functionality impact, only startup time is higher because of this issue.

This PR fixes the warning and improves startup performance of the docker image

Reviewers:  Manikumar Reddy <anikumar.reddy@gmail.co
2024-04-22 14:51:39 +05:30
Omnia Ibrahim 5e96e5c898
KAFKA-15853 Refactor KafkaConfig to use PasswordEncoderConfigs (#15770)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-22 00:47:57 +08:00
TingIāu "Ting" Kì 98548c517d
KAFKA-16591 Clear all admins after close all them. (#15763)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-21 06:26:44 +08:00
TingIāu "Ting" Kì 34f65d3853
MINOR: Fixed incorrect references for SASL_OAUTHBEARER_SCOPE_CLAIM_NAME_DEFAULT and SASL_OAUTHBEARER_SUB_CLAIM_NAME_DEFAULT (#15760)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-21 06:16:05 +08:00
Kuan-Po (Cooper) Tseng ced79ee12f
KAFKA-16552 Create an internal config to control InitialTaskDelayMs in LogManager to speed up tests (#15719)
Reviewers: Luke Chen <showuon@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-20 20:34:02 +08:00
hudeqi 613d4c8578
MINOR: fix hint in fetchOffsetForTimestamp (#15757)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-20 20:14:21 +08:00
Gaurav Narula 0308543d59
KAFKA-16082 Avoid resuming future replica if current replica is in the same directory (#15136)
It is observed that for scenario (3), i.e. a broker crashes while it
waits for the future replica to catch up for the second time and the
`dir1` is unavailable when the broker is restarted, the
broker tries to create the partition in `dir2` according to the metadata
in the controller. However, ReplicaManager also tries to resume the
stale future replica which was abandoned when the broker crashed. This
results in the renaming of the future replica to fail eventually because
the directory for the topic partition already exists in `dir2` and the
broker then marks `dir2` as offline.

This PR attempts to fix this behaviour by ignoring any future replicas
which are in the same directory as where the log exists. It further
marks the stale future replica for deletion.

Reviewers: Omnia Ibrahim <o.g.h.ibrahim@gmail.com>,  Igor Soarez <soarez@apple.com>, Proven Provenzano <pprovenzano@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-20 04:18:51 +08:00
Omnia Ibrahim ecb2dd4cdc
KAFKA-15853 Move KafkaConfig log properties and docs out of core (#15569)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Nikolay <nizhikov@apache.org>, Federico Valeri <fvaleri@redhat.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-20 04:14:23 +08:00
Apoorv Mittal 76e089142b
KAFKA-16486: Integrate KIP-1019 measurability changes (KIP-714) (#15682)
The PR leverages the changes defined in KIP-1019. Does the cleanup for accessing KafkaMetric field by reflection and uses method exposed by KIP-1019 for metric measurability.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2024-04-19 11:53:12 -07:00
vamossagar12 f22ad6645b
KAFKA-16272: Adding new coordinator related changes for connect_distributed.py (#15594)
Summary of the changes:

Parameterizes the tests to use new coordinator and pass in consumer group protocol. This would be applicable to sink connectors only.
Enhances the sink connector creation code in system tests to accept a new optional parameter for consumer group protocol to be used.
Sets the consumer group protocol via consumer.override. override config when the new group coordinator is enabled.
Note about testing: There are 288 tests that need to be run and running on my local takes a lot of time. I will try to post the test results once I have a full run.

Reviewers: Kirk True <ktrue@confluent.io>, Lucas Brutschy <lbrutschy@confluent.io>, Philip Nee <pnee@confluent.io>
2024-04-19 17:29:50 +02:00
Philip Nee b87cd66dab
KAFKA-16579: Revert Consumer Rolling Upgrade (#15753)
Consumer Rolling Upgrade is meant to test the protocol upgrade for the old protocol. Therefore, I am removing old changes.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-04-19 11:36:27 +02:00
Lianet Magrans 9ea0503e23
KAFKA-16566: Fix consumer static membership system test with new protocol (#15738)
Updating consumer system test that was failing with the new protocol, related to static membership behaviour. The behaviour regarding static consumers that join with conflicting group instance id is slightly different between the classic and new consumer protocol, so the expectations in the tests needed to be updated.

If static members join with same instance id:

Classic protocol: all members join the group with the same group instance id, and then the first one will eventually fail (receives a HB error with FencedInstanceIdException)

Consumer protocol: new member with an instance Id already in use is not able to join, and first member remains active (new member with same instance Id receives an UnreleasedInstanceIdException in the response to the HB to join the group)

This PR is keeping the single parametrized test that existed before, given that what's being tested and part of the test itself apply to all protocols. This is just updating the expectations that are different, based on the protocol parameter.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Kirk True <ktrue@confluent.io>
2024-04-19 11:34:05 +02:00
Josep Prat 8f2fca7bd8
MINOR: Use Parametrized types correctly in RemoteLogMetadataSerde (#13824)
RemoteLogMetadataSerde references RemoteLogMetadataTransform in a Raw
form. Given that the class is parametrized we should make use of it.

Signed-off-by: Josep Prat <josep.prat@aiven.io>

Reviewers:  Matthew de Detrich <matthew.dedetrich@aiven.io>, Mickael Maison <mickael.maison@gmail.com>
2024-04-19 09:04:27 +02:00
Matthias J. Sax 5783159175
MINOR: disable internal result emit throttling in TTD (#15660)
Kafka Streams DSL operators use internal wall-clock based throttling
parameters for performance reasons. These configs make the usage of TTD
difficult: users need to advance the mocked wall-clock time in
their test code, or set these internal configs to zero.

To simplify testing, TDD should disable both configs automatically.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-04-18 18:49:10 -07:00
Apoorv Mittal 5d3f8670b4
KAFKA-16280: Expose method to determine metric measurability (KIP-1019) (#15681)
Implements KIP-1019, which exposes method to check if metric is of type Measurable.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2024-04-18 18:13:29 -07:00
Calvin Liu 53ff1a5a58
KAFKA-15585: DescribeTopicPartitions client side change. (#15470)
Add the support for DescribeTopicPartitions API to AdminClient. For this initial implementation, we are simply loading all of the results into memory on the client side. 

Reviewers: Andrew Schofield <aschofield@confluent.io>, Kirk True <ktrue@confluent.io>, David Jacot <djacot@confluent.io>, Artem Livshits <alivshits@confluent.io>, David Arthur <mumrah@gmail.com>
2024-04-18 12:09:14 -04:00
Mickael Maison aee9724ee1
MINOR: Remove unneeded explicit type arguments (#15736)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-17 21:55:58 +02:00
Kamal Chandraprakash a3dcbd4e28
KAFKA-16073: Increment the local-log-start-offset before deleting segments in memory table (#15631)
Co-authored-by: hzh0425 <642256541@qq.com>

Reviewers: Luke Chen <showuon@gmail.com>, Jun Rao <junrao@gmail.com>
2024-04-17 09:41:29 -07:00
Ayoub Omari e63efbc5d7
MINOR: fix duplicated return and other streams docs typos (#15713)
Reviewers: Johnny Hsu <johnnyhsu@fb.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-17 21:26:04 +08:00
Mickael Maison 7b1c777b33
MINOR: Various cleanups in connect (#15734)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-17 20:47:25 +08:00
Omnia Ibrahim 363f4d2847
KAFKA-15853 Move consumer group and group coordinator configs out of core (#15684)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-17 20:41:22 +08:00
Dongnuo Lyu a9f65a5d7f
KAFKA-16436; Online upgrade triggering and group type conversion (#15662)
This patch introduces the conversion from a classic group to a consumer group when a member joins with the new consumer group protocol (epoch is 0) but only if the conversion is enabled.

Reviewers: David Jacot <djacot@confluent.io>
2024-04-17 04:57:44 -07:00
Nikolay be18775af0
MINOR: adds '-parameters' compiler option for :core tests (#15729)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-17 19:06:07 +08:00
Michael Westerby 44196984bd
KAFKA-16363 Storage tool crashes if dir is unavailable (#15733)
Reviewers: Igor Soarez <soarez@apple.com>, Federico Valeri <fedevaleri@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-17 19:03:51 +08:00
Gaurav Narula 4954c578d4
KAFKA-16559 allow defining number of disks per broker in TestKitNodes (#15730)
Reviewers: Igor Soarez <soarez@apple.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-17 13:45:37 +08:00
Johnny Hsu 5193eb9323
KAFKA-16475: add test for TopicImageNodeTest (#15720)
Add a unit test for TopicImageNodeTest.

Co-authored-by: Johnny Hsu <johnnyhsu@fb.com>
Reviewers: Colin P. McCabe <cmccabe@apache.org>
2024-04-16 10:20:34 -07:00
Gyeongwon, Do 4e1a23d948
MINOR: Fix typo in OffsetCommitCallbackInvoker's javadoc (#15643)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Johnny Hsu <johnny.chhsu01@gmail.com>
2024-04-16 18:06:43 +02:00