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

Correct comments for the method Selector.clear

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • clients
    • None

    Description

      According to my understanding, the second clearCompletedSends which is highlighted as followed should be clearCompletedReceives

      /**

      • Clears all the results from the previous poll. This is invoked by Selector at the start of
      • a poll() when all the results from the previous poll are expected to have been handled.
      • <p>
      • SocketServer uses clearCompletedSends() and clearCompletedSends() to
      • clear `completedSends` and `completedReceives` as soon as they are processed to avoid
      • holding onto large request/response buffers from multiple connections longer than necessary.
      • Clients rely on Selector invoking {@link #clear()}

        at the start of each poll() since memory usage

      • is less critical and clearing once-per-poll provides the flexibility to process these results in
      • any order before the next poll.
        */

      Attachments

        Activity

          People

            zhaohaidao HaiyuanZhao
            zhaohaidao HaiyuanZhao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: