hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12150) Backport replication changes from HBASE-12145
Date Thu, 02 Oct 2014 01:03:34 GMT

    [ https://issues.apache.org/jira/browse/HBASE-12150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155925#comment-14155925
] 

Hadoop QA commented on HBASE-12150:
-----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12672464/HBASE-12150.patch
  against trunk revision .
  ATTACHMENT ID: 12672464

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified
tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:red}-1 patch{color}.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/11179//console

This message is automatically generated.

> Backport replication changes from HBASE-12145
> ---------------------------------------------
>
>                 Key: HBASE-12150
>                 URL: https://issues.apache.org/jira/browse/HBASE-12150
>             Project: HBase
>          Issue Type: Task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.98.7
>
>         Attachments: HBASE-12150.patch
>
>
> HBASE-12145 makes all zk accesses synchronized in RecoverableZooKeeper in branch-1 +:
> {code}
> @@ -690,23 +692,23 @@ public class RecoverableZooKeeper {
>      return newData;
>    }
>  
> -  public long getSessionId() {
> -    return zk == null ? null : zk.getSessionId();
> +  public synchronized long getSessionId() {
> +    return zk == null ? -1 : zk.getSessionId();
>    }
>  
> -  public void close() throws InterruptedException {
> +  public synchronized void close() throws InterruptedException {
>      if (zk != null) zk.close();
>    }
>  
> -  public States getState() {
> +  public synchronized States getState() {
>      return zk == null ? null : zk.getState();
>    }
>  
> -  public ZooKeeper getZooKeeper() {
> +  public synchronized ZooKeeper getZooKeeper() {
>      return zk;
>    }
>  
> -  public byte[] getSessionPasswd() {
> +  public synchronized byte[] getSessionPasswd() {
>      return zk == null ? null : zk.getSessionPasswd();
>    }
> {code}
> It also makes this change:
> {code}
> @@ -391,8 +390,14 @@ public class ReplicationPeersZKImpl extends ReplicationStateZKBase
implements Re
>      if (peer == null) {
>        return false;
>      }
> -    ((ConcurrentMap<String, ReplicationPeerZKImpl>) peerClusters).putIfAbsent(peerId,
peer);
> -    LOG.info("Added new peer cluster " + peer.getPeerConfig().getClusterKey());
> +    ReplicationPeerZKImpl previous =
> +      ((ConcurrentMap<String, ReplicationPeerZKImpl>) peerClusters).putIfAbsent(peerId,
peer);
> +    if (previous == null) {
> +      LOG.info("Added new peer cluster=" + peer.getPeerConfig().getClusterKey());
> +    } else {
> +      LOG.info("Peer already present, " + previous.getPeerConfig().getClusterKey() +
> +        ", new cluster=" + peer.getPeerConfig().getClusterKey());
> +    }
>      return true;
>    }
> {code}
> We should keep the 0.98 code in sync with these changes because these affect correctness.
Would like to avoid "this change works in branch-1 or master but breaks in some weird way
in 0.98" issues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message