Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-136

Timer in MessageStream listener not initialized when heartbeat is turned off and throws NRE on Dispose

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.6, 1.2 Beta
    • Fix Version/s: 1.2 Beta-2
    • Component/s: None
    • Labels:
      None

      Description

      From end-user:

      In MessageStreamListener.cs, there is a private member variable called timer (which is an instance of System.Threading.Timer). This is not initialized if HeartbeatSettings.IsEnabled is false. However the code will de-reference it two places within Heartbeat.Dispose() and one place within Heartbeat.Worker(). I saw that at a minimum it was throwing exceptions in Dispose() as a result of this.

      I didn't see Worker() throw, but they do have a try/catch there, which if triggered by this would result in an erroneous "HB: Node not available" message being logged (I say erroneous because this particular exception would only happen if a read completed without an exception).

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        john John Zablocki (Inactive) added a comment -

        Published and tagged

        Show
        john John Zablocki (Inactive) added a comment - Published and tagged

          People

          • Assignee:
            john John Zablocki (Inactive)
            Reporter:
            john John Zablocki (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes