Commit Graph

2025 Commits

Author SHA1 Message Date
Matthias J. Sax b35ca4349d
KAFKA-9274: Throw TaskCorruptedException instead of TimeoutException when TX commit times out (#10072)
Part of KIP-572: follow up work to PR #9800. It's not save to retry a TX commit after a timeout, because it's unclear if the commit was successful or not, and thus on retry we might get an IllegalStateException. Instead, we will throw a TaskCorruptedException to retry the TX if the commit failed.

Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>
2021-02-19 13:36:07 -08:00
Bruno Cadonna 5b761e66cc
MINOR: Correct warning about increasing capacity when insufficient nodes to assign standby tasks (#10151)
We should only recommend to increase the number of KafkaStreams instances, not the number of threads, since a standby task can never be placed on the same instance as an active task regardless of the thread count

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-02-19 12:26:12 -08:00
Marco Aurelio Lotz c8112b5ecd
KAFKA-9524: increase retention time for window and grace periods longer than one day (#10091)
Reviewers: Victoria Xia <victoria.xia@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2021-02-18 18:18:53 -08:00
Matthias J. Sax b50a78b4ac
TRIVIAL: fix JavaDocs formatting (#10134)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Bill Bejeck <bill@confluent.io>
2021-02-18 16:02:25 -08:00
Matthias J. Sax d4de383f5f
KAFKA-12272: Fix commit-interval metrics (#10102)
Reviewer: A. Sophie Blee-Goldman <sophie@confluent.io>
2021-02-11 16:49:05 -08:00
Lee Dongjin 83ec80988a
MINOR: Remove always-passing validation in TestRecordTest#testProducerRecord (#9930)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-02-11 23:21:22 +08:00
dengziming 3769bc21b5
MINOR: replace hard-coding utf-8 with StandardCharsets.UTF_8 (#10079)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-02-09 10:06:01 +08:00
John Roesler 1f240ce179 bump to 2.9 development version 2021-02-07 09:25:36 -06:00
Boyang Chen d2cb2dc45d
KAFKA-9751: Forward CreateTopicsRequest for FindCoordinator/Metadata when topic creation is needed (#9579)
Consolidate auto topic creation logic to either forward a CreateTopicRequest or handling the creation directly as AutoTopicCreationManager, when handling FindCoordinator/Metadata request.

Co-authored-by: Jason Gustafson <jason@confluent.io>

Reviewers: Jason Gustafson <jason@confluent.io>
2021-02-06 13:04:30 -08:00
Matthias J. Sax 0bc394cc1d
KAFKA-9274: handle TimeoutException on task reset (#10000)
Part of KIP-572: We move the offset reset for the internal "main consumer" when we revive a corrupted task, from the "task cleanup" code path, to the "task init" code path. For this case, we have already logic in place to handle TimeoutException that might be thrown by consumer#committed() method call.

Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>
2021-02-05 17:25:50 -08:00
Matthias J. Sax 470e6f2b9a
KAFKA-9274: Add timeout handling for `StreamPartitioner` (#9997)
Part of KIP-572: When a custom `StreamPartitioner` is used, we need to get the number of partitions of output topics from the producer. This `partitionFor(topic)` call may through a `TimeoutException` that we now handle gracefully.

Reviewers: John Roesler <john@confluent.io>, A. Sophie Blee-Goldman <sophie@confluent.io>
2021-02-04 19:02:56 -08:00
Arjun Satish c8dc74e16d
MINOR: Word count should account for extra whitespaces between words (#10044)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2021-02-04 18:54:08 -08:00
Ivan Ponomarev 5552da3a20
KAFKA-5488: Add type-safe split() operator (#9107)
Implements KIP-418, that deprecated the `branch()` operator in favor of the newly added and type-safe `split()` operator.

Reviewers: Matthias J. Sax <matthias@confluent.io>, John Roesler <john@confluent.io>
2021-02-04 16:23:35 -08:00
A. Sophie Blee-Goldman 706f5097b7
KAFKA-10716: persist UUID in state directory for stable processId across restarts (#9978)
To stabilize the task assignment across restarts of the JVM we need some way to persist the process-specific UUID. We can just write it to a file in the state directory, and initialize it from there or create a new one if no prior UUID exists.

Reviewers: Walker Carlson <wcarlson@confluent.io>, Leah Thomas <lthomas@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2021-02-03 18:01:26 -08:00
vamossagar12 51833bf37c
KAFKA-10648: Add Prefix Scan support to State Stores (#9508)
Add prefix scan support to State stores. Currently, only RocksDB and InMemory key value stores are being supported.

Reviewers: Bruno Cadonna <bruno@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2021-02-03 10:26:30 -08:00
leah f5a2fbac6d
KAFKA-10366 & KAFKA-9649: Implement KIP-659 to allow TimeWindowedDeserializer and TimeWindowedSerde to handle window size (#9253)
See KIP details and discussions here: https://cwiki.apache.org/confluence/display/KAFKA/KIP-659%3A+Improve+TimeWindowedDeserializer+and+TimeWindowedSerde+to+handle+window+size

Deprecates methods that allow users to skip setting a window size when one is needed. Adds a window size streams config to allow the timeWindowedDeserializer to calculate window end time.

Reviewers: Walker Carlson <wcarlson@confluent.io>, John Roesler <vvcephei@apache.org>, Guozhang Wang <wangguoz@gmail.com>
2021-02-01 16:20:35 -08:00
CHUN-HAO TANG 47b417260c
MINOR: fix @link tags in javadoc (#9939)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-02-01 12:40:02 +08:00
Walker Carlson bd6c212538
KAFKA-12247: add timeout and static group rebalance to remove thread (#9984)
Add timeout to remove thread, and trigger thread to explicitly leave the group even in case of static membership

Reviewers: Bruno Cadonna <bruno@confluent.io>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-01-29 12:35:34 -08:00
Lee Dongjin e3ff4b0870
KAFKA-10604: Fix Streams default state.dir (#9420)
Make the default state store directory location to follow
OS-specific temporary directory settings or java.io.tmpdir
JVM parameter, with Utils#getTempDir.

Reviewers: Matthias J. Sax <mjsax@apache.org>, John Roesler <vvcephei@apache.org>
2021-01-29 09:45:13 -06:00
mathieu 550d8b8260
KAFKA-8744: Update Scala API to give names to processors (#9738)
As it's only API extension to match the java API with Named object with lots of duplication, I only tested the logic once.

Reviewers: Bill Bejeck <bbejeck@apache.org>
2021-01-28 09:57:18 -05:00
Chia-Ping Tsai a5deb5326f
MINOR: remove duplicate code of serializing auto-generated data (#9964)
Reviewers: David Jacot <djacot@confluent.io>
2021-01-28 17:14:28 +08:00
John Roesler 4d28391480
KAFKA-10867: Improved task idling (#9840)
Use the new ConsumerRecords.metadata() API to implement
improved task idling as described in KIP-695

Reviewers: Guozhang Wang <guozhang@apache.org>
2021-01-27 21:57:20 -06:00
John Roesler fdcf8fbf72
KAFKA-10866: Add metadata to ConsumerRecords (#9836)
Expose fetched metadata via the ConsumerRecords
object as described in KIP-695.

Reviewers: Guozhang Wang <guozhang@apache.org>
2021-01-27 18:18:38 -06:00
dengziming c830bce570
MINOR: Fix meaningless message in assertNull validation (#9965)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-01-27 11:14:31 +08:00
Walker Carlson 647c609cef
KAFKA-10555: Improve client state machine (#9720)
Implements KIP-696: Add new state PENDING_ERROR to KafkaStreams client.

Reviewers: Matthias J. Sax <matthias@confluent.io>, Bruno Cadonna <bruno@confluent.io>
2021-01-26 11:43:49 -08:00
Andy Wilkinson e1a4dccc15
KAFKA-12190: Fix setting of file permissions on non-POSIX filesystems (#9947)
Previously, StateDirectory used PosixFilePermissions to configure its directories' permissions which fails on Windows as its file system is not POSIX-compliant. This PR updates StateDirectory to fall back to the File API on non-POSIX-compliant file systems. 

Reviewers: Luke Chen <43372967+showuon@users.noreply.github.com>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-01-25 11:33:05 -08:00
Walker Carlson 667a6b2d26
MINOR: fix record time in test shouldWipeOutStandbyStateDirectoryIfCheckpointIsMissing (#9948)
Reviewer: Matthias J. Sax <matthias@confluent.io>
2021-01-22 15:55:05 -08:00
Bruno Cadonna 7b06a2417d
MINOR: Restore interrupt status when closing (#9863)
We do not always own the thread that executes the close()  method, i.e., we do not know the interruption policy of the thread. Thus, we should not swallow the interruption. The least we can do is restoring the interruption status before the current thread exits this method.

Reviewers: Walker Carlson <wcarlson@confluent.io>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-01-22 12:15:52 -08:00
Bruno Cadonna 019cd4ab80
KAFKA-10357: Extract setup of repartition topics from Streams partition assignor (#9848)
KIP-698: extract the code for the setup of the repartition topics from the Streams partition assignor so that it can also be called outside of a rebalance.

Reviewers: Leah Thomas <lthomas@confluent.io> , Guozhang Wang <guozhang@confluent.io>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-01-22 10:03:39 -08:00
A. Sophie Blee-Goldman 45550e98f0
MINOR: log 2min processing summary of StreamThread loop (#9941)
Remove all INFO-level logging from the main StreamThread loop in favor of a summary with a 2min interval

Reviewers: Walker Carlson <carlson@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2021-01-21 16:32:55 -08:00
Matthias J. Sax 92e72f7bf9
KAFKA-12185: fix ConcurrentModificationException in newly added Tasks container class (#9940)
Reviewers: Guozhang Wang <guozhand@confluent.io>, A. Sophie Blee-Goldman <sophie@confluent.io>
2021-01-21 08:52:34 -08:00
Luke Chen 462c89e0b4
KAFKA-12211: don't change perm for base/state dir when no persistent store (#9904)
If a user doesn't have Persistent Stores, we won't create base dir and state dir and should not try to set permissions on them.

Reviewers: Bruno Cadonna <cadonna@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-01-20 11:37:56 -08:00
Chia-Ping Tsai 38b320a1f2
HOTFIX: fix RocksDBMetricsTest (#9935)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-01-20 22:58:04 +08:00
Matthias J. Sax 0158e1d719
MINOR: Add 'task container' class to KafkaStreams TaskManager (#9835)
Kafka Streams' TaskManager is a central class that grew quite big. This
PR breaks out a new 'task container' class to descope what TaskManager
does. In follow up PRs, we plan to move more methods from TaskManager
to the new 'Tasks.java' class and also improve task-type type safety.

Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>
2021-01-19 19:28:46 -08:00
Bruno Cadonna add160d522
KAFKA-9924: Add docs for RocksDB properties-based metrics (#9895)
Document the new properties-based metrics for RocksDB

Reviewers: Leah Thomas <lthomas@confluent.io>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-01-19 13:30:23 -08:00
Lee Dongjin 4c6f900673
KAFKA-12219: Add 'synchronized' keyword to InMemoryKeyValueStore#[reverseRange, reverseAll] (#9923)
Reviewers: Guozhang Wang <wangguoz@gmail.com>
2021-01-19 10:34:46 -08:00
Luke Chen 130274b7f6
KAFKA-10017: fix uncaucht-exception handling in EosBetaUpgradeIntegrationTest (#9733)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2021-01-19 10:31:14 -08:00
Chia-Ping Tsai 6752f28254
KAFKA-12195 Fix synchronization issue happening in KafkaStreams (#9887)
Reviewers: Guozhang Wang <wangguoz@gmail.com>
2021-01-19 17:54:34 +08:00
Luke Chen 277c4371c7
KAFKA-12194: use stateListener to catch each state change (#9888)
Reviewers: Guozhang Wang <wangguoz@gmail.com>, Bruno Cadonna <bruno@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2021-01-19 13:38:30 +08:00
Chia-Ping Tsai 04827dad51
KAFKA-12171: Migrate streams:test-utils module to JUnit 5 (#9856)
* replace `org.junit.Assert` by `org.junit.jupiter.api.Assertions`
* replace `org.junit` by `org.junit.jupiter.api`
* replace `org.junit.runners.Parameterized` by `org.junit.jupiter.params.ParameterizedTest`
* replace `org.junit.runners.Parameterized.Parameters` by `org.junit.jupiter.params.provider.{Arguments, MethodSource}`
* replace `Before` by `BeforeEach`
* replace `After` by `AfterEach`

Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-01-13 21:23:48 -08:00
A. Sophie Blee-Goldman fec6831b10
MINOR: reduce StreamThread INFO logging during low traffic (#9875)
Avoid spamming the logs at the INFO level in a tight loop when there are no new records being polled

Reviewers: Walker Carlson <wcarlson@confluent.io>, Leah Thomas <lthomas@confluent.io>
2021-01-13 14:32:09 -08:00
Bruno Cadonna ee5ef89a71
MINOR: Fix flaky test shouldQuerySpecificActivePartitionStores (#9873)
Reviewers: Guozhang Wang <wangguoz@gmail.com>
2021-01-13 10:01:14 -08:00
Boyang Chen 94a0aac81d
MINOR: Add restoration time tracking (#9830)
Add Stream restoration time tracking log

Reviewers: John Roesler <vvcephei@apache.org>
2021-01-13 09:05:23 -08:00
Chia-Ping Tsai bed4c6a33b
KAFKA-12172 Migrate streams:examples module to JUnit 5 (#9857)
This PR includes following changes.
1. replace org.junit.Assert by org.junit.jupiter.api.Assertions
2. replace org.junit by org.junit.jupiter.api
3. replace Before by BeforeEach
4. replace After by AfterEach

Reviewers: Ismael Juma <ismael@confluent.io>
2021-01-13 21:02:13 +08:00
Walker Carlson aedb53a4e6
KAFKA-10500: Add KafkaStreams#removeStreamThread (#9695)
Add the ability to remove running threads

Reviewers: Bruno Cadonna <cadonna@confluent.io>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-01-11 12:38:02 -08:00
dengziming 119a2d9127
MINOR: Substitute assertEquals(null) with assertNull (#9852)
Reviewers: David Jacot <djacot@confluent.io>
2021-01-10 20:06:37 +01:00
Chia-Ping Tsai 913a019d6c
MINOR: replace test "expected" parameter by assertThrows (#9520)
This PR includes following changes.

1. @Test(expected = Exception.class) is replaced by assertThrows
2. remove reference to org.scalatest.Assertions
3. change the magic code from 1 to 2 for testAppendAtInvalidOffset to test ZSTD
4. rename testMaybeAddPartitionToTransactionXXXX to testNotReadyForSendXXX
5. increase maxBlockMs from 1s to 3s to avoid unexpected timeout from TransactionsTest#testTimeout

Reviewers: Ismael Juma <ismael@confluent.io>
2021-01-10 20:20:13 +08:00
Matthias J. Sax 94f9b919ab
KAFKA-9566: Improve DeserializationExceptionHandler JavaDocs (#9837)
Reviewers: John Roesler <john@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2021-01-07 15:59:33 -08:00
Matthias J. Sax 22e8e71156
KAFKA-9274: Fix commit-TimeoutException handling for EOS (#9800)
If EOS is enabled and the TX commit fails with a timeout,
we should not process more messages (what is ok for non-EOS)
because we don't really know the status of the TX.
If the commit was indeed successful, we won't have an open TX
can calling send() would fail with an fatal error.

Instead, we should retry the (idempotent) commit of the TX,
and start a new TX afterwards.

Reviewers: Boyang Chen <boyang@confluent.io>, John Roesler <john@confluent.io>
2021-01-06 14:01:02 -08:00
Matthias J. Sax 393139064f
MINOR: code cleanup for Kafka Streams task interface (#9801)
Reviewer: John Roesler <john@confluent.io>
2021-01-06 13:51:07 -08:00