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

Remove completedFetch upon a failed parse if it contains no records.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0.2, 1.0.0, 1.0.1, 1.1.0
    • Fix Version/s: 2.0.0
    • Component/s: clients, consumer
    • Labels:
      None

      Description

      This patch removed a completedFetch from the completedFetches queue upon a failed parse if it contains no records. The following scenario explains why this is needed for an instance of this case – i.e. in TopicAuthorizationException.

      0. Let's assume a scenario, in which the consumer is attempting to read from a topic without the necessary read permission.
      1. In Fetcher#fetchedRecords(), after peeking the completedFetches, the Fetcher#parseCompletedFetch(CompletedFetch) throws a TopicAuthorizationException (as expected).
      2. Fetcher#fetchedRecords() passes the TopicAuthorizationException up without having a chance to poll completedFetches. So, the same completedFetch remains at the completedFetches queue.
      3. Upon following calls to Fetcher#fetchedRecords(), peeking the completedFetches will always return the same completedFetch independent of any updates to the ACL that the topic is trying to read from.
      4. Hence, despite the creation of an ACL with correct permissions, once the consumer sees the TopicAuthorizationException, it will be unable to recover without a bounce.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                agencer Adem Efe Gencer
                Reporter:
                agencer Adem Efe Gencer
                Reviewer:
                Jiangjie Qin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: