Uploaded image for project: 'Bookkeeper'
  1. Bookkeeper
  2. BOOKKEEPER-393

Double-close of HedwigSubscriber channel

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • hedwig-client
    • None

    Description

      In HedwigSubscriber, calling unsubscribe():

      1. calls closeSubscription() synchronously, which removes the subscriber's channel for the topic
      2. asyncSubUnsub uses the publisher's channel to send the UNSUBSCRIBE message, which bypasses the missing subscriber channel
      3. (later, when the UNSUBSCRIBE response arrives) UnsubscribeResponseHandler.handleUnsubscribeResponse calls closeSubscription() again, which fails to find the previously closed channel with a warning:
        WARN  - [New I/O client worker #2-2:HedwigSubscriber@759] - Trying to close a subscription when we don't have a subscribe channel cached for topic
        

      In the case described above, the double-close is harmless. But it's easy to imagine another situation where a client re-subscribes after unsubscribing, and the async closeSubscription described above causes their new channel to be closed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            stuhood Stu Hood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment