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

Shutdown function does not shutdown ViewConnection Thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.1-beta
    • None
    • None
    • Security Level: Public
    • None
    • 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(); }

      Attachments

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

        Activity

          People

            daschl Michael Nitschinger
            james.mauss James Mauss (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty