Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-94

Shutdown function does not shutdown ViewConnection Thread

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1-beta
    • Component/s: None
    • Security Level: Public
    • Labels:
      None
    • Environment:
      1.0.3

      Description

      The patch (ViewConnection.java) in the bug http://www.couchbase.com/issues/browse/JCBC-26 fixed the dead loop issue, but it introduced another Shutdown issue.
      when calling the shutdown function of CouchbaseClient, it could not shutdown the thread of the ViewConnection.

      Public void run() {
      While(running) {
      If (!reconfiguring) {
      Synchronized(threadLock)
      {
      Boolean hasOps = false;
      While(!hasOps) { ==> While(!hasOps && running)
      For (viewNode node: couchNodes) {
      If (node.hasWriteOps())

      { hasOps = true; break; }

      }
      ......
      If (!hasOps)

      { threadLock.wait(); }

      }
      }
      If (running)

      { handleIO(); }
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        mikew Mike Wiederhold added a comment -

        Duplicate of JCBC-96.

        Show
        mikew Mike Wiederhold added a comment - Duplicate of JCBC-96 .
        Hide
        daschl Michael Nitschinger added a comment -

        I guess there is something I need to look into - I'm going to verify that soon and report my findings!

        Show
        daschl Michael Nitschinger added a comment - I guess there is something I need to look into - I'm going to verify that soon and report my findings!
        Hide
        daschl Michael Nitschinger added a comment -

        I started tracking this down today. See the progress of it here: http://review.couchbase.com/#/c/21301/

        I'll update this ticket as soon as the problem is reliably detected.

        Show
        daschl Michael Nitschinger added a comment - I started tracking this down today. See the progress of it here: http://review.couchbase.com/#/c/21301/ I'll update this ticket as soon as the problem is reliably detected.
        Hide
        daschl Michael Nitschinger added a comment -

        pushed to master, will be available in dp5.

        Show
        daschl Michael Nitschinger added a comment - pushed to master, will be available in dp5.

          People

          • Assignee:
            daschl Michael Nitschinger
            Reporter:
            james.mauss James Mauss
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes