HBASE-8998 TestSnapshotCloneIndependence.testOnlineSnapshotMetadataChangesIndependent fails
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1504933 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
49368f26d6
commit
54c1e1b517
|
@ -293,7 +293,7 @@ public class Procedure implements Callable<Void>, ForeignExceptionListener {
|
||||||
* @param member
|
* @param member
|
||||||
*/
|
*/
|
||||||
public void barrierAcquiredByMember(String 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");
|
+ "' on coordinator");
|
||||||
if (this.acquiringMembers.contains(member)) {
|
if (this.acquiringMembers.contains(member)) {
|
||||||
synchronized (joinBarrierLock) {
|
synchronized (joinBarrierLock) {
|
||||||
|
|
|
@ -164,14 +164,15 @@ public class ProcedureCoordinator {
|
||||||
Future<Void> f = null;
|
Future<Void> f = null;
|
||||||
try {
|
try {
|
||||||
synchronized (procedures) {
|
synchronized (procedures) {
|
||||||
f = this.pool.submit(proc);
|
|
||||||
// if everything got started properly, we can add it known running procedures
|
|
||||||
this.procedures.put(procName, proc);
|
this.procedures.put(procName, proc);
|
||||||
|
f = this.pool.submit(proc);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (RejectedExecutionException e) {
|
} catch (RejectedExecutionException e) {
|
||||||
LOG.warn("Procedure " + procName + " rejected by execution pool. Propagating error and " +
|
LOG.warn("Procedure " + procName + " rejected by execution pool. Propagating error and " +
|
||||||
"cancelling operation.", e);
|
"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
|
// the thread pool is full and we can't run the procedure
|
||||||
proc.receive(new ForeignException(procName, e));
|
proc.receive(new ForeignException(procName, e));
|
||||||
|
|
||||||
|
@ -258,9 +259,12 @@ public class ProcedureCoordinator {
|
||||||
*/
|
*/
|
||||||
void memberAcquiredBarrier(String procName, final String member) {
|
void memberAcquiredBarrier(String procName, final String member) {
|
||||||
Procedure proc = procedures.get(procName);
|
Procedure proc = procedures.get(procName);
|
||||||
if (proc != null) {
|
if (proc == null) {
|
||||||
proc.barrierAcquiredByMember(member);
|
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) {
|
void memberFinishedBarrier(String procName, final String member) {
|
||||||
Procedure proc = procedures.get(procName);
|
Procedure proc = procedures.get(procName);
|
||||||
if (proc != null) {
|
if (proc == null) {
|
||||||
proc.barrierReleasedByMember(member);
|
LOG.warn("Member '"+ member +"' is trying to release an unknown procedure '"+ procName +"'");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
proc.barrierReleasedByMember(member);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -182,6 +182,8 @@ public class ZKProcedureCoordinatorRpcs implements ProcedureCoordinatorRpcs {
|
||||||
ZKUtil.getNodeName(path));
|
ZKUtil.getNodeName(path));
|
||||||
} else if (isAbortPathNode(path)) {
|
} else if (isAbortPathNode(path)) {
|
||||||
abort(path);
|
abort(path);
|
||||||
|
} else {
|
||||||
|
LOG.debug("Ignoring created notification for node:" + path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue