You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Eugene Kirpichov (JIRA)" <ji...@apache.org> on 2009/06/23 16:45:07 UTC

[jira] Resolved: (HBASE-1571) HBaseClient.Connection.sendParam is not synchronized, which may lead to an NPE

     [ https://issues.apache.org/jira/browse/HBASE-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene Kirpichov resolved HBASE-1571.
-------------------------------------

    Resolution: Invalid

Sorry; a look at the code revealed that the situation I describe is impossible.

> HBaseClient.Connection.sendParam is not synchronized, which may lead to an NPE
> ------------------------------------------------------------------------------
>
>                 Key: HBASE-1571
>                 URL: https://issues.apache.org/jira/browse/HBASE-1571
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.19.2, 0.19.3
>            Reporter: Eugene Kirpichov
>
> Suppose that two threads are concurrently calling HBaseClient.getConnection() to an address to which no connection has been made yet, or one existed but has been dropped due to an error.
> One of the threads creates a Connection object, puts it into the 'connections' map, and there, starts doing setupIOStreams, and there goes a context switch.
> The second thread also calls getConnection and gets a connection from the 'connections' map, whose 'out' stream is only going to be initialized by the second thread, but has not yet been. There, at synchronized(this.out), goes an NPE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.