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

Double-close of HedwigSubscriber channel

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: hedwig-client
    • Labels:
      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

            • Assignee:
              Unassigned
              Reporter:
              stuhood Stu Hood

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment