You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jon Poulton (JIRA)" <ji...@apache.org> on 2018/09/26 20:20:00 UTC

[jira] [Created] (HBASE-21239) REST Client class is not thread safe

Jon Poulton created HBASE-21239:
-----------------------------------

             Summary: REST Client class is not thread safe
                 Key: HBASE-21239
                 URL: https://issues.apache.org/jira/browse/HBASE-21239
             Project: HBase
          Issue Type: Bug
          Components: Client, REST
    Affects Versions: 3.0.0
            Reporter: Jon Poulton
             Fix For: 3.0.0


The REST Client class for HBase is not Thread safe, and the class itself does not have thread safety documented in the Javadoc. Previous versions of the class were thread safe.

Adhering to the "principal of least surprise" future versions of the Client class should also be thread safe. 

The class can be found on the master branch, [however the issue |https://github.com/apache/hbase/blob/master/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java]exists at least as far back as version 2.1. On [line 68|https://github.com/apache/hbase/blob/master/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java#L68] and [line 69|https://github.com/apache/hbase/blob/master/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java#L69] are two instance variables that can potentially change on a per-request basis, are not synchronized and have no associated Lock. Both variables should be removed and their usage within method should be replaced with variables local to the method. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)