@Override protected Procedure[] execute(final TestProcEnv env) throws ProcedureYieldException { LOG.info("execute step " + step); if (step++ < 5) { throw new ProcedureYieldException(); } return null; }
} catch (ProcedureYieldException e) { if (LOG.isTraceEnabled()) { LOG.trace("Yield " + procedure + ": " + e.getMessage(), e);
LOG.trace("Yield procedure: " + procedure + ": " + e.getMessage());
private void dispathWals(SyncReplicationReplayWALManager syncReplicationReplayWALManager) throws ProcedureYieldException { try { List<Path> wals = syncReplicationReplayWALManager.getReplayWALsAndCleanUpUnusedFiles(peerId); addChildProcedure(wals.stream() .map(wal -> new SyncReplicationReplayWALProcedure(peerId, Arrays.asList(syncReplicationReplayWALManager.removeWALRootPath(wal)))) .toArray(SyncReplicationReplayWALProcedure[]::new)); } catch (IOException e) { LOG.warn("Failed to get replay wals for peer id={}, , retry", peerId, e); throw new ProcedureYieldException(); } }
@Override protected Procedure[] execute(TestProcEnv env) throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException { if (this.yield) { if (yieldNum < yieldCount) { yieldNum++; throw new ProcedureYieldException(); } } if (!this.success) { setFailure("Failed", new InterruptedException("Failed")); return null; } return subprocs; }
@Override protected Procedure[] execute(final TestProcEnv env) throws ProcedureYieldException, ProcedureSuspendedException { LOG.info("EXECUTE " + this + " suspend " + (lock != null)); timestamps.add(env.nextTimestamp()); if (triggerRollback) { setFailure(getClass().getSimpleName(), new Exception("injected failure")); } else if (throwYield) { throw new ProcedureYieldException(); } else if (throwSuspend) { throw new ProcedureSuspendedException(); } return null; }
@Override protected Procedure[] execute(TestProcedureEnv env) throws ProcedureYieldException { LOG.trace("execute procedure step=" + step + ": " + this); if (step == 0) { step = 1; execId = env.nextExecId(); return new Procedure[] { this }; } else if (step == 2) { env.addToExecList(this); return null; } throw new ProcedureYieldException(); }
@Override protected Procedure[] execute(TestProcedureEnv env) throws ProcedureYieldException { LOG.trace("execute procedure step=" + step + ": " + this); if (step == 0) { step = 1; execId = env.nextExecId(); return new Procedure[] { new TestSingleStepProcedure() }; } else if (step == 2) { env.addToExecList(this); return null; } throw new ProcedureYieldException(); }
} catch (IOException e) { LOG.warn("Failed to cleanup replay wals dir for peer id={}, , retry", peerId, e); throw new ProcedureYieldException();
@Override protected Procedure[] execute(final TestProcEnv env) throws ProcedureYieldException { LOG.info("execute step " + step); if (step++ < 5) { throw new ProcedureYieldException(); } return null; }
@Override protected Procedure[] execute(final TestProcEnv env) throws ProcedureYieldException { LOG.info("execute step " + step); if (step++ < 5) { throw new ProcedureYieldException(); } return null; }
private void throwProcedureYieldException(final String msg) throws ProcedureYieldException { String logMsg = msg + "; cycle=" + this.cycles + ", running for " + StringUtils.formatTimeDiff(System.currentTimeMillis(), getStartTime()); // The procedure executor logs ProcedureYieldException at trace level. For now, log these // yields for server crash processing at DEBUG. Revisit when stable. if (LOG.isDebugEnabled()) LOG.debug(logMsg); throw new ProcedureYieldException(logMsg); }
@Override protected Procedure[] execute(TestProcEnv env) throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException { if (this.yield) { if (yieldNum < yieldCount) { yieldNum++; throw new ProcedureYieldException(); } } if (!this.success) { setFailure("Failed", new InterruptedException("Failed")); return null; } return subprocs; }
@Override protected Procedure[] execute(TestProcEnv env) throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException { if (this.yield) { if (yieldNum < yieldCount) { yieldNum++; throw new ProcedureYieldException(); } } if (!this.success) { setFailure("Failed", new InterruptedException("Failed")); return null; } return subprocs; }
@Override protected Procedure[] execute(final TestProcEnv env) throws ProcedureYieldException, ProcedureSuspendedException { LOG.info("EXECUTE " + this + " suspend " + (lock != null)); timestamps.add(env.nextTimestamp()); if (triggerRollback) { setFailure(getClass().getSimpleName(), new Exception("injected failure")); } else if (throwYield) { throw new ProcedureYieldException(); } else if (throwSuspend) { throw new ProcedureSuspendedException(); } return null; }
@Override protected Procedure[] execute(TestProcedureEnv env) throws ProcedureYieldException { LOG.trace("execute procedure step=" + step + ": " + this); if (step == 0) { step = 1; execId = env.nextExecId(); return new Procedure[] { this }; } else if (step == 2) { env.addToExecList(this); return null; } throw new ProcedureYieldException(); }
@Override protected Procedure[] execute(final TestProcEnv env) throws ProcedureYieldException, ProcedureSuspendedException { LOG.info("EXECUTE " + this + " suspend " + (lock != null)); timestamps.add(env.nextTimestamp()); if (triggerRollback) { setFailure(getClass().getSimpleName(), new Exception("injected failure")); } else if (throwYield) { throw new ProcedureYieldException(); } else if (throwSuspend) { throw new ProcedureSuspendedException(); } return null; }
@Override protected Procedure[] execute(TestProcedureEnv env) throws ProcedureYieldException { LOG.trace("execute procedure step=" + step + ": " + this); if (step == 0) { step = 1; execId = env.nextExecId(); return new Procedure[] { this }; } else if (step == 2) { env.addToExecList(this); return null; } throw new ProcedureYieldException(); }
@Override protected Procedure[] execute(TestProcedureEnv env) throws ProcedureYieldException { LOG.trace("execute procedure step=" + step + ": " + this); if (step == 0) { step = 1; execId = env.nextExecId(); return new Procedure[] { new TestSingleStepProcedure() }; } else if (step == 2) { env.addToExecList(this); return null; } throw new ProcedureYieldException(); }
@Override protected Procedure[] execute(TestProcedureEnv env) throws ProcedureYieldException { LOG.trace("execute procedure step=" + step + ": " + this); if (step == 0) { step = 1; execId = env.nextExecId(); return new Procedure[] { new TestSingleStepProcedure() }; } else if (step == 2) { env.addToExecList(this); return null; } throw new ProcedureYieldException(); }