hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1504933 - in /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure: Procedure.java ProcedureCoordinator.java ZKProcedureCoordinatorRpcs.java
Date Fri, 19 Jul 2013 16:28:37 GMT
Author: stack
Date: Fri Jul 19 16:28:36 2013
New Revision: 1504933

URL: http://svn.apache.org/r1504933
Log:
HBASE-8998 TestSnapshotCloneIndependence.testOnlineSnapshotMetadataChangesIndependent fails

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureCoordinatorRpcs.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java?rev=1504933&r1=1504932&r2=1504933&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java
Fri Jul 19 16:28:36 2013
@@ -293,7 +293,7 @@ public class Procedure implements Callab
    * @param member
    */
   public void barrierAcquiredByMember(String member) {
-    LOG.debug("member: '" + member + "' joining prepared barrier for procedure '" + procName
+    LOG.debug("member: '" + member + "' joining acquired barrier for procedure '" + procName
         + "' on coordinator");
     if (this.acquiringMembers.contains(member)) {
       synchronized (joinBarrierLock) {

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java?rev=1504933&r1=1504932&r2=1504933&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java
Fri Jul 19 16:28:36 2013
@@ -164,14 +164,15 @@ public class ProcedureCoordinator {
     Future<Void> f = null;
     try {
       synchronized (procedures) {
-        f = this.pool.submit(proc);
-        // if everything got started properly, we can add it known running procedures
         this.procedures.put(procName, proc);
+        f = this.pool.submit(proc);
       }
       return true;
     } catch (RejectedExecutionException e) {
       LOG.warn("Procedure " + procName + " rejected by execution pool.  Propagating error
and " +
           "cancelling operation.", e);
+      // Remove the procedure from the list since is not started
+      this.procedures.remove(procName);
       // the thread pool is full and we can't run the procedure
       proc.receive(new ForeignException(procName, e));
 
@@ -258,9 +259,12 @@ public class ProcedureCoordinator {
    */
   void memberAcquiredBarrier(String procName, final String member) {
     Procedure proc = procedures.get(procName);
-    if (proc != null) {
-      proc.barrierAcquiredByMember(member);
+    if (proc == null) {
+      LOG.warn("Member '"+ member +"' is trying to acquire an unknown procedure '"+ procName
+"'");
+      return;
     }
+
+    proc.barrierAcquiredByMember(member);
   }
 
   /**
@@ -271,9 +275,11 @@ public class ProcedureCoordinator {
    */
   void memberFinishedBarrier(String procName, final String member) {
     Procedure proc = procedures.get(procName);
-    if (proc != null) {
-      proc.barrierReleasedByMember(member);
+    if (proc == null) {
+      LOG.warn("Member '"+ member +"' is trying to release an unknown procedure '"+ procName
+"'");
+      return;
     }
+    proc.barrierReleasedByMember(member);
   }
 
   /**

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureCoordinatorRpcs.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureCoordinatorRpcs.java?rev=1504933&r1=1504932&r2=1504933&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureCoordinatorRpcs.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureCoordinatorRpcs.java
Fri Jul 19 16:28:36 2013
@@ -182,6 +182,8 @@ public class ZKProcedureCoordinatorRpcs 
               ZKUtil.getNodeName(path));
           } else if (isAbortPathNode(path)) {
             abort(path);
+          } else {
+            LOG.debug("Ignoring created notification for node:" + path);
           }
         }
       };



Mime
View raw message