hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu Shaohui (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
Date Wed, 06 Aug 2014 11:17:11 GMT
Liu Shaohui created HBASE-11685:
-----------------------------------

             Summary: Incr/decr on the reference count of HConnectionImplementation need be
atomic 
                 Key: HBASE-11685
                 URL: https://issues.apache.org/jira/browse/HBASE-11685
             Project: HBase
          Issue Type: Bug
          Components: Client
            Reporter: Liu Shaohui
            Assignee: Liu Shaohui
            Priority: Minor


Currently, the incr/decr operation on the ref count of HConnectionImplementation are not atomic.
This may cause that the ref count always be larger than 0 and  the connection never be closed.

{code}
    /**
     * Increment this client's reference count.
     */
    void incCount() {
      ++refCount;
    }

    /**
     * Decrement this client's reference count.
     */
    void decCount() {
      if (refCount > 0) {
        --refCount;
      }
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message