Skip to content
Snippets Groups Projects
  1. Mar 15, 2019
  2. Mar 14, 2019
  3. Mar 12, 2019
    • Bill Bejeck's avatar
      MINOR: Use Java 8 lambdas in KStreamImplTest (#6430) · 9ecadc4d
      Bill Bejeck authored
      Just a minor cleanup to use Java 8 lambdas vs anonymous classes in this test.
      
      I ran all tests in the streams test suite
      
      Reviewers: Matthias J. Sax <mjsax@apache.org>, Guozhang Wang <wangguoz@gmail.com>
      9ecadc4d
    • Rajini Sivaram's avatar
      KAFKA-7976; Update config before notifying controller of unclean leader update (#6426) · 0f83c4cd
      Rajini Sivaram authored
      When unclean leader election is enabled dynamically on brokers, we notify controller of the update before updating KafkaConfig. When processing this event, controller's decision to elect unclean leaders is based on the current KafkaConfig, so there is a small timing window when the controller may not elect unclean leader because KafkaConfig of the server was not yet updated. The commit fixes this timing window by using the existing BrokerReconfigurable interface used by other classes which rely on the current value of KafkaConfig.
      
      Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
    • huxihx's avatar
      KAFKA-7801: TopicCommand should not be able to alter transaction topic partition count · 29036069
      huxihx authored
      To keep align with the way it handles the offset topic, TopicCommand should not be able to alter transaction topic partition count.
      
      Author: huxihx <huxi_2b@hotmail.com>
      
      Reviewers: Viktor Somogyi <viktorsomogyi@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Manikumar Reddy <manikumar.reddy@gmail.com>
      
      Closes #6109 from huxihx/KAFKA-7801
      29036069
  4. Mar 11, 2019
    • Rajini Sivaram's avatar
      KAFKA-8091; Wait for processor shutdown before testing removed listeners (#6425) · 9aaa32b6
      Rajini Sivaram authored
      DynamicBrokerReconfigurationTest.testAddRemoveSaslListeners removes a listener, waits for the config to be propagated to all brokers and then validates that connections to the removed listener fail. But there is a small timing window between config update and Processor shutdown. Before validating that connections to a removed listener fail, this commit waits for all metrics of the removed listener to be deleted, ensuring that the Processors of the listener have been shutdown.
      
      Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
    • huxihx's avatar
      MINOR: Update delete topics zk path in assertion error messages · 1e1b669e
      huxihx authored
      - Update delete topics zk path  from /admin/delete_topic to /admin/delete_topics in assertion error
      messages
      
      Author: huxihx <huxi_2b@hotmail.com>
      
      Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
      
      Closes #6422 from huxihx/delete-topics
      1e1b669e
  5. Mar 10, 2019
  6. Mar 08, 2019
    • Zhanxiang (Patrick) Huang's avatar
      KAFKA-8069; Fix early expiration of offsets due to invalid loading of expire timestamp (#6401) · 44be5d22
      Zhanxiang (Patrick) Huang authored
      After the 2.1 release, if the broker hasn't been upgrade to the latest inter-broker protocol version, the committed offsets stored in the __consumer_offset topic will get cleaned up way earlier than it should be when the offsets are loaded back from the __consumer_offset topic in GroupCoordinator, which will happen during leadership transition or after broker bounce. This patch fixes the bug by setting expireTimestamp to None if it is the default value after loading v1 offset records from __consumer_offsets.
      
      Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
      44be5d22
    • Rajini Sivaram's avatar
      KAFKA-7980 - Fix timing issue in SocketServerTest.testConnectionRateLimit (#6391) · 47bc85f2
      Rajini Sivaram authored
      Test currently checks that there were at least 5 polls when 5 connections are established with connectionQueueSize=1. But we could be doing the check just after the 5th connection before the 5th poll, so updated the check to verify that there were at least 4 polls.
      
      Reviewers: Ismael Juma <ismael@juma.me.uk>
    • Jason Gustafson's avatar
      KAFKA-7831; Do not modify subscription state from background thread (#6221) · 460e46c3
      Jason Gustafson authored
      Metadata may be updated from the background thread, so we need to protect access to SubscriptionState. This patch restructures the metadata handling so that we only check pattern subscriptions in the foreground. Additionally, it improves the following:
      
      1. SubscriptionState is now the source of truth for the topics that will be fetched. We had a lot of messy logic previously to try and keep the the topic set in Metadata consistent with the subscription, so this simplifies the logic.
      2. The metadata needs for the producer and consumer are quite different, so it made sense to separate the custom logic into separate extensions of Metadata. For example, only the producer requires topic expiration.
      3. We've always had an edge case in which a metadata change with an inflight request may cause us to effectively miss an expected update. This patch implements a separate version inside Metadata which is bumped when the needed topics changes.
      4. This patch removes the MetadataListener, which was the cause of https://issues.apache.org/jira/browse/KAFKA-7764. 
      
      Reviewers: David Arthur <mumrah@gmail.com>, Rajini Sivaram <rajinisivaram@googlemail.com>
  7. Mar 07, 2019
    • KartikVK's avatar
      KAFKA-7950; Update description for the "time" parameter for GetOffsetShell · f708e782
      KartikVK authored
      Added additional description for the "time" parameter for GetOffsetShell which adds " No offset is returned if timestamp provided is greater than recently committed record timestamp." in the description.
      
      Author: KartikVK <karthikkalaghatgi123@gmail.com>
      
      Reviewers: huxi <huxi_2b@hotmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>
      
      Closes #6357 from Kartikvk1996/kartik-branch
      f708e782
    • Jun Rao's avatar
      KAFKA-8018: Flaky Test... · 73737892
      Jun Rao authored
      KAFKA-8018: Flaky Test SaslSslAdminClientIntegrationTest#testLegacyAclOpsNeverAffectOrReturnPrefixed
      
      Disable forceSync in EmbeddedZookeeper.
      Increase ZK tick to allow longer maxSessionTimeout in tests.
      Increase ZK client session timeout in tests.
      Handle transient ZK session expiration exception in test utils for createTopic.
      
      Author: Jun Rao <junrao@gmail.com>
      
      Reviewers: Guozhang Wang <wangguoz@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>, Ismael Juma <ismael@juma.me.uk>
      
      Closes #6354 from junrao/KAFKA-8018
      73737892
  8. Mar 06, 2019
  9. Mar 04, 2019
    • Manikumar Reddy's avatar
      KAFKA-7312: Change broker port used in testMinimumRequestTimeouts and testForceClose · 9ee5f920
      Manikumar Reddy authored
      Port 22 is used by ssh, which causes the AdminClient to throw an OOM:
      
      > java.lang.OutOfMemoryError: Java heap space
      > 	at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
      > 	at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
      > 	at org.apache.kafka.common.memory.MemoryPool$1.tryAllocate(MemoryPool.java:30)
      > 	at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:112)
      > 	at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:424)
      > 	at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:385)
      > 	at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:640)
      > 	at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:561)
      > 	at org.apache.kafka.common.network.Selector.poll(Selector.java:472)
      > 	at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:535)
      > 	at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1140)
      > 	at java.lang.Thread.run(Thread.java:748)
      >
      >
      
      Author: Manikumar Reddy <manikumar.reddy@gmail.com>
      Author: Ismael Juma <ismael@juma.me.uk>
      
      Reviewers: Ismael Juma <ismael@juma.me.uk>
      
      Closes #6360 from omkreddy/KAFKA-7312
      9ee5f920
  10. Mar 02, 2019
    • Mickael Maison's avatar
      KAFKA-7997: Use automatic RPC generation in SaslAuthenticate · 0d56f141
      Mickael Maison authored
      Author: Mickael Maison <mickael.maison@gmail.com>
      
      Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
      
      Closes #6324 from mimaison/sasl-authenticate
      0d56f141
    • Bob Barrett's avatar
      KAFKA-8002; Log dir reassignment stalls if future replica has different segment base offset (#6346) · 57604c23
      Bob Barrett authored
      This patch fixes a bug in log dir reassignment where Partition.maybeReplaceCurrentWithFutureReplica would compare the entire LogEndOffsetMetadata of each replica to determine whether the reassignment has completed. If the active segments of both replicas have different base segments (for example, if the current replica had previously been cleaned and the future replica rolled segments at different points), the reassignment will never complete. The fix is to compare only the LogEndOffsetMetadata.messageOffset for each replica. Tested with a unit test that simulates the compacted current replica case.
      
      Reviewers: Anna Povzner <anna@confluent.io>, Jason Gustafson <jason@confluent.io>
      57604c23
  11. Mar 01, 2019
    • Manikumar Reddy's avatar
      KAFKA-7922: Return authorized operations in describe consumer group responses (KIP-430 Part-1) · f11fa5ef
      Manikumar Reddy authored
      -  Use automatic RPC generation in DescribeGroups Request/Response classes
      
      Author: Manikumar Reddy <manikumar.reddy@gmail.com>
      
      Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
      
      Closes #6322 from omkreddy/KIP-430-Return-Ops
      f11fa5ef
    • Colin Hicks's avatar
      KAFKA-8012; Ensure partitionStates have not been removed before truncating. (#6333) · 70828cea
      Colin Hicks authored
      This patch fixes a regression in the replica fetcher which occurs when the replica fetcher manager simultaneously calls `removeFetcherForPartitions`, removing the corresponding partitionStates, while a replica fetcher thread attempts to truncate the same partition(s) in `truncateToHighWatermark`. This causes an NPE which causes the fetcher to crash.
      
      This change simply checks that the `partitionState` is not null first. Note that a similar guard exists in `truncateToEpochEndOffsets`.
      
      Reviewers: Stanislav Kozlovski <stanislav_kozlovski@outlook.com>, Jason Gustafson <jason@confluent.io>
      70828cea
  12. Feb 28, 2019
  13. Feb 27, 2019
  14. Feb 26, 2019
    • Gardner Vickers's avatar
      KAFKA-7956 In ShutdownableThread, immediately complete the shutdown if the... · bd6520a2
      Gardner Vickers authored
      KAFKA-7956 In ShutdownableThread, immediately complete the shutdown if the thread has not been started (#6218)
      
      In some test cases it's desirable to instantiate a subclass of `ShutdownableThread` without starting it. Since most subclasses of `ShutdownableThread` put cleanup logic in `ShutdownableThread.shutdown()`, being able to call `shutdown()` on the non-running thread would be useful.
      
      This change allows us to avoid blocking in `ShutdownableThread.shutdown()` if the thread's `run()` method has not been called. We also add a check that `initiateShutdown()` was called before `awaitShutdown()`, to protect against the case where a user calls `awaitShutdown()` before the thread has been started, and unexpectedly is not blocked on the thread shutting down.
      
      Reviewers : Dhruvil Shah <dhruvil@confluent.io>, Jun Rao <junrao@gmail.com>
      bd6520a2
    • Jason Gustafson's avatar
      MINOR: Refactor replica log dir fetching for improved logging (#6313) · 66a6fc72
      Jason Gustafson authored
      In order to debug problems with log directory reassignments, it is helpful to know when the fetcher thread begins moving a particular partition. This patch refactors the fetch logic so that we stick to a selected partition as long as it is available and log a message when a different partition is selected.
      
      Reviewers: Viktor Somogyi-Vass <viktorsomogyi@gmail.com>, Dong Lin <lindong28@gmail.com>, Jun Rao <junrao@gmail.com>
  15. Feb 25, 2019
  16. Feb 23, 2019
  17. Feb 22, 2019
  18. Feb 21, 2019
    • huxi's avatar
      KAFKA-7763; Calls to commitTransaction and abortTransaction should not block indefinitely (#6066) · 201da054
      huxi authored
      Currently, commitTransaction and abortTransaction wait indefinitely for the respective operation to be completed. This patch uses the producer's max block time to limit the time that we will wait. If the timeout elapses, we raise a TimeoutException, which allows the user to either close the producer or retry the operation.
      
      Reviewers: Guozhang Wang <wangguoz@gmail.com>, Jason Gustafson <jason@confluent.io>
      201da054
    • Jason Gustafson's avatar
      MINOR: Handle Metadata v0 all topics requests during parsing (#6300) · f775be05
      Jason Gustafson authored
      Use of `MetadataRequest.isAllTopics` is not consistently defined for all versions of the api. For v0, it evaluates to false. This patch makes the behavior consistent for all versions.
      
      Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
    • Chia-Ping Tsai's avatar
      KAFKA-6161 Add default implementation to close() and configure() for Serdes (#5348) · 35a0de32
      Chia-Ping Tsai authored
      Reviewers: Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
      35a0de32
    • Murad's avatar
      KAFKA-7930: topic is not internal if explicitly listed in args (#6267) · 8de3092b
      Murad authored
      Reviewers: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
      8de3092b
    • Zhanxiang (Patrick) Huang's avatar
      KAFKA-7283: Enable lazy mmap on index files and skip sanity check for segments... · 2932d32a
      Zhanxiang (Patrick) Huang authored
      KAFKA-7283: Enable lazy mmap on index files and skip sanity check for segments below recovery point (#5498)
      
      Per the KIP-263 discussion, we think we can improve broker restart time by avoiding performing costly disk operations when sanity checking index files for segments below recovery point on broker startup.
      
      This PR includes the following changes:
      
      1. Mmap the index file and populate fields of the index file on-demand rather than performing costly disk operations when creating the index object on broker startup.
      2. Skip sanity checks on the time index and offset index of segments.
         
         1. For segment with offset below the flushed point (recovery point), these segments are safely flushed so we don't need to sanity check the index files. if there are indeed data corruption on disk, given that we don't sanity check the segment file, sanity checking only the indexes adds little benefit.
         2. For segment with offset above the flushed point (recovery point), we will recover these segments in `recoveryLog()` (Log.scala) in any case so sanity checking the index files for these segments is redundant.
      
      We did experiments on a cluster with 15 brokers, each of which has ~3k segments (and there are 31.8k partitions with RF=3 which are evenly distributed across brokers; total bytes-in-rate is around 400 MBps). The results show that rolling bounce time reduces from 135 minutes to 55 minutes.
      
      Reviewers: Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>
      2932d32a
  19. Feb 20, 2019
    • Lee Dongjin's avatar
      KAFKA-7920; Do not permit zstd produce requests until IBP is updated to 2.1 (#6256) · 71a7219d
      Lee Dongjin authored
      Fail produce requests using zstd until the inter.broker.protocol.version is large enough that replicas are ensured to support it. Otherwise, followers receive the `UNSUPPORTED_COMPRESSION_TYPE` when fetching zstd data and ISRs shrink.
      
      Reviewers: Jason Gustafson <jason@confluent.io>
      71a7219d
    • Arjun Satish's avatar
      KAFKA-7909; Ensure timely rebalance completion after pending members rejoin or fail (#6251) · 4cb8f56b
      Arjun Satish authored
      Fix the following situations, where pending members (one that has a member-id, but hasn't joined the group) can cause rebalance operations to fail: 
      
      - In AbstractCoordinator, a pending consumer should be allowed to leave.
      - A rebalance operation must successfully complete if a pending member either joins or times out.
      - During a rebalance operation, a pending member must be able to leave a group.
      
      Reviewers: Boyang Chen <bchen11@outlook.com>, Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
      4cb8f56b
  20. Feb 18, 2019
    • Ismael Juma's avatar
      KAFKA-7487: DumpLogSegments misreports offset mismatches (#5756) · e17352f0
      Ismael Juma authored
      - Compare last offset of first batch (instead of first offset) with index offset
      - Early exit from loop due to zero entries must happen before checking for mismatch
      - {TimeIndex,OffsetIndex}.entry should return absolute offset like other methods.
      These methods are only used by DumpLogSegments.
      - DumpLogSegments now calls `closeHandlers` on OffsetIndex, TimeIndex
      and FileRecords.
      - Add OffsetIndex, TimeIndex and DumpLogSegments tests
      - Remove unnecessary casts by using covariant returns in OffsetIndex and TimeIndex
      - Minor clean-ups
      - Fix `checkArgs` so that it does what it says only.
      
      Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Sriharsha Chintalapani <sriharsha@apache.org>
    • Ismael Juma's avatar
      KAFKA-7935: UNSUPPORTED_COMPRESSION_TYPE if ReplicaManager.getLogConfig returns None (#6274) · 45a896e7
      Ismael Juma authored
      Replaced `forall` with `exists`. Added a unit test to `KafkaApisTest` that failed before the change.
      
      Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
      45a896e7
Loading