git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Reopened] (HBASE-20597) Use a lock to serialize access to a shared reference to ZooKeeperWatcher in HBaseReplicationEndpoint


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

Sean Busbey reopened HBASE-20597:
---------------------------------

reopening. the findbugs complaint was due to this patch.

{code}
    */
-  // Synchronize peer cluster connection attempts to avoid races and rate
-  // limit connections when multiple replication sources try to connect to
-  // the peer cluster. If the peer cluster is down we can get out of control
-  // over time.
-  public synchronized List<ServerName> getRegionServers() {
+  public List<ServerName> getRegionServers() {
     try {

{code}

This removal of {{synchronized}} from the {{getRegionServers}} method means that the {{regionServers}} variable no longer has a read guard when it is returned, but still has a write guard in {{setRegionServers}}.


> Use a lock to serialize access to a shared reference to ZooKeeperWatcher in HBaseReplicationEndpoint
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-20597
>                 URL: https://issues.apache.org/jira/browse/HBASE-20597
>             Project: HBase
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.3.2, 1.4.4
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>            Priority: Minor
>             Fix For: 3.0.0, 2.1.0, 1.5.0, 1.3.3, 2.0.1, 1.4.5
>
>         Attachments: HBASE-20597-branch-1.patch, HBASE-20597.patch
>
>
> The code that closes down a ZKW that fails to initialize when attempting to connect to the remote cluster is not MT safe and can in theory leak ZooKeeperWatcher instances. The allocation of a new ZKW and store to the reference is not atomic. Might have concurrent allocations with only one winning store, leading to leaked ZKW instances. 



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