Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-12478

Consumer group may lose data for newly expanded partitions when add partitions for topic if the group is set to consume from the latest

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: 2.7.0
    • Fix Version/s: None
    • Component/s: clients
    • Labels:

      Description

        This problem is exposed in our product environment: a topic is used to produce monitoring data. After expanding partitions, the consumer side of the business reported that the data is lost.

        After preliminary investigation, the lost data is all concentrated in the newly expanded partitions. The reason is: when the server expands, the producer firstly perceives the expansion, and some data is written in the newly expanded partitions. But the consumer group perceives the expansion later, after the rebalance is completed, the newly expanded partitions will be consumed from the latest if it is set to consume from the latest. Within a period of time, the data of the newly expanded partitions is skipped and lost by the consumer.

        If it is not necessarily set to consume from the earliest for a huge data flow topic when starts up, this will make the group consume historical data from the broker crazily, which will affect the performance of brokers to a certain extent. Therefore, it is necessary to consume these partitions from the earliest separately.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hudeqi hudeqi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1,158h
                1,158h
                Remaining:
                Remaining Estimate - 1,158h
                1,158h
                Logged:
                Time Spent - Not Specified
                Not Specified